how to implement "run to here&quo...

Peter
2012-01-24
2012-10-15
  • Peter

    Peter - 2012-01-24

    how to implement "run to here" , "step over" for c debugger?

     
  • Peter

    Peter - 2012-01-24

    i am adding c/c++ source level debug support for peter-bochs.

     
  • Stanislav Shwartsman

    First of all in Bochs internal debugger where is a command 'next' which
    supposed to do exactly this (step over). Hopefully the command even working :)
    I agree it is written very stupid way and should be done more robust, once
    somebody (like you) has a demand for this - I might invest in it some time.
    probably the right way should be to create dummy code breakpoint on next
    instruction (RIP+len) and just run to it. Once code breakpoint is hit -
    immediatelly remove it.
    BTW - this approach you could do in peter-bochs by yourself, just add a new
    code breakpoint and run.

    Stanislav

     
  • Stanislav Shwartsman

    BTW, I am planning another debugger feature for Bochs and would like to know
    if you are interested.
    Bochs could remember last N branches/control transfers through its execution
    in some debugger structure like HW LBR which remembers 16 branches only, but
    unlimited.
    So for example you can set

    set lbr = 100000
    c
    and then print last 100000 taken branches and this way to know control path
    you came here.
    the print will look like:

    icount 10 branch from A to B (5 times) # means 5 loop iterations
    icount 100 branch from C to D
    icount 104 branch from E to F
    and etc

    Stanislav

     
  • Peter

    Peter - 2012-01-24

    in peter-bochs, you can plot a call graph (http://code.google.com/p/peter-
    bochs/wiki/Profiling),
    i just manually record all the call/jmp by
    instrumentation, but it is very slow.
    I think a call graph is very import for hacker/operating system developer,
    IDAPro also has a very useful call graph. Good to know you want to add such
    feature.

    My goal this year is to make peter-bochs to support c/c++ level debug, and
    support debugging linux kernel. Then I guess bochs will be famous in linux
    world. May be we can sell it to some universities.

     
  • Peter

    Peter - 2012-01-27

    "next" command works, thanks

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks