This discussion is archived
6 Replies Latest reply: Sep 21, 2012 2:06 AM by 881506 RSS

Jumping ot an instruction

880686 Newbie
Currently Being Moderated
Hi,

Often when debugging hotspot we have a crash where it says something like:

PSPromotionManager::copy_to_survivor_space<false>(oopDesc*)+0x51

It would be very helpful if I could just enter this into a goto-instruction search box and automatically get the corresponding instruction marked in some way.
/Jesper
  • 1. Re: Jumping ot an instruction
    881506 Newbie
    Currently Being Moderated
    Hi,
    Address field at the bottom of the disassembly is supposed for that... Unfortunately the field does not accept expressions, I filed https://netbeans.org/bugzilla/show_bug.cgi?id=218612 for that and hopefully will fix it today. Until you get the fix you can enter the expression into Expression Evaluation window and use the address it provides in the disassembly.
  • 2. Re: Jumping ot an instruction
    IvanIgorovich Newbie
    Currently Being Moderated
    I don't understand. If the crash is in foo::bar+0x51 then the disassembly window should automatically
    be showing that function in the editor area.

    You might have to do some 'down's or click on the top frame in the stack view to see that disassembly
    because dbx will normally attempt to find some source up the stack and show that preferentially.
    (See `help dbxenv` under dbxenv stack_find_source).
  • 3. Re: Jumping ot an instruction
    880686 Newbie
    Currently Being Moderated
    Sorry, I wasn't clear enough.

    I'm not debugging in Studio when the crash appears, most often it's not me who encounters the crash at all. I just read about it in a bug report. I don't have a reproducer and I don't have a core file.

    So all I want to do is to open Studio in regular edit mode (no debugger) and go to the instruction to see where the crash happened. Especially when I have several crash reports that have crashed in the same function but at different places it would be helpful to see if the crashes are related or in completely different parts of the code.
    /Jesper
  • 4. Re: Jumping ot an instruction
    881506 Newbie
    Currently Being Moderated
    Now I see, filed:
    https://netbeans.org/bugzilla/show_bug.cgi?id=218673

    please add your comments there if needed.
    Thanks
  • 5. Re: Jumping ot an instruction
    IvanIgorovich Newbie
    Currently Being Moderated
    From the dbx cmdline you can do something like this:

    (dbx) debug a.out
    (dbx) func PSPromotionManager::copy_to_survivor_space
    (dbx) listi

    I would've expected the IDE to honor the 'func' and bring the disassembly window to bear on
    copy_to_survivor_space but it doesn't. It works for source code but not non-g code.
    There's also other issues with disassembly window modality. E.g. I can say

    (dbx) func foo
    # IDE shows source
    # In IDE switch to disassembly it shows disassembly but for what's on the stack, not foo.
  • 6. Re: Jumping ot an instruction
    881506 Newbie
    Currently Being Moderated
    agree, I've filed an RFE for this as well

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points