This is the mail archive of the insight@sourceware.org mailing list for the Insight project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: howto disassemble without debug information


Marco Cavallini wrote:
Sorry for the misunderstanding.
Seems hard to explain what I want to do, but every commercial debugging software I tested has this feature and I'm wondering if insight/gdb can do the same.
I actually need trace the execution step-by-stp of assembler code without debug info, is it possible and how ?
I don't care about breakpoints at the moment it was only an example.
The best I've done until now is to show the disassembled of binary code with : (gdb) x/10i 0x0

Read the GDB documentation or do "help stepi".

This seems what I was looking for, thank you.


Last question: is it possible to see the ASM code and execute a step from inside INSIGHT using a mouse click (always without debug info) ?
I haven't found this feature.


Does exist a manual for INSIGHT

Actually, you're going to run into a lot of trouble using an assembler-only approach to debugging. GDB was simply never written to deal properly with this situation. As a result, Insight won't be of much help in this regard, either.


Source code display for assembler really does require some minimal debug info (even just minimal symbols from the compiler would do). As you've already discovered, Insight will only display assembler within the bounds of a function. It acts the same way gdb's "disassemble" command does. There is no insight equivalent of gdb's "x/i" command.

But there could be a way to improve this situation for yourself. You could, for example, build the target's executable with full debugging info and then process (eg, strip the debug info) this to generate something to download to the board. That way at least, gdb would have full access to symbols. (That's where "exec-file" and "symbol-file" commands come in handy.)

If the source code is all assembler (no C/C++/etc), it could still work. GAS does (or used to?) put some debugging information into the object files, but it requires much more programmer diligence to use.

Sorry, but Insight this was never really a requirement for Insight, and no one has gone back and implemented something a little more robust yet.

Keith


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]