Re: Development / Debugging tools - advice needed.

From: M. Glenn Lewis (mlewis00_at_nospam.tctwest.no.com.net)
Date: 04/06/04


Date: Mon, 05 Apr 2004 18:38:16 -0600

Inline reply...
Grant Taylor wrote:

> "M. Glenn Lewis"
> <mlewis00@nospam.tctwest.no.com.net>
> writes:
>
>> I need to be able to load a raw
>> binary image from a file and view /
>> run it in assembler mode, obviously,
>> without source.
>
>> I would be like to find a 'graphical'
>> debugger but not necessarily GUI.
>> Could be something like Borland Turbo
>> Debugger (i.e. text mode 'graphical'
>> interface with menus, etc.).
>
> Why the graphics? If you have no
> source there isn't much to make
> pretty. Regardless of tool, you will
> only be able to show memory dumps,
> disassembly listings, and registers.

That is exactly what I want to show. I
want to be able to see CPU
(disassembly), registers, stack, memory
dump, and coprocessor on the screen at
the same time. A graphical interface
(or text mode graphical interface) is
the only way I can think of to get all
of this information on the screen at
the same time. If I had mentioned the
mouse you would probably think I was
describing Turbo Debugger for DOS. That
is basically what I am describing,
except that I the mouse is not
absolutely necessary.
 
>> I have built DDD 3.3.1 but it doesn't
>> seem to have the capability to load a
>> binary image from a file (I don't
>> want to have to convert every image I
>> want to disassemble to executable
>> format just to examine it).
>
> DDD is merely a gdb wrapper. Get GDB
> (or some other actual debugger) to do
> what you want, then look for a GUI if
> necessary.

I have GDB and have tried it both with
and without DDD. The problem with DDD
is that it does not allow me, for
example, to have the registers on the
screen except in a dialog box type
window. This window then takes the
input focus away from the main window
and prevents me from 'stepi' while
simultaneously viewing the registers.
It also covers up the disassembler
output of GDB. What I need is a
front-end for GDB (or another debugger
entirely) that will allow me to place
all of this information on the screen
in the layout that suits me (like the
old [text mode] Turbo debugger for DOS
/ Win32 / Windows). This gives you a
lot of information at a glance and
allows you to concentrate on what is
actually going on with each instruction
trace.

>> I looked at the help in gdb and it
>> doesn't seem to be able to load a
>> file if it is not in linux executable
>> format (which would also explain why
>> DDD can't).
>
> This is entirely reasonable for
> Debian's gdb; Linux itself will also
> be unable to run such an executable,
> so why support debugging it?

I'm new to Linux and was unaware of
this. With Turbo Debugger for DOS you
can load an arbitrary binary image from
a file and TD will treat it as a binary
executable. It will load it into
memory, disassemble it and display all
of the information I need (CPU,
registers, memory dump, etc.), set
CS:IP to the beginning of the image's
location in memory, and I can start
stepping through the image at offset
0x00 (or an arbitrary address of my
choice).

> You can compile GDB with support for
> arbitrary cross and/or non-Linux
> targets. Your ability to run such
> code will of course be limited, but
> you should be able to disassemble,
> look up symbols, etc. Not that you
> have symbols...

I guess I'm either asking too much of
the OS or I haven't researched it
enough. What I was hoping was that I
could load such an image into a virtual
machine type of debugging session where
Linux would allow me to step through a
binary image or even assemble and test
code directly through the debugger.
This is possible with Turbo Debugger
386 for DOS but I didn't want to go
through all of the trouble of setting
up the environment that it requires
(i.e. basically, booted into DOS with
just the debugger running) just to
accomplish my goal. If I could find a
similar debugger for Linux I could
remain booted into Debian, 'debug' the
image and at the same time have access
to my text editor or other software I
need to use in conjunction with the
project at hand.

> For a few targets, there are CPU
> emulators available that hook into
> GDB. MIPS, for example, can be
> emulated on x86; for some platforms
> you can run this cpu emulator and a
> hardware simulation library.
>
> People also occasionally hook their
> verilog/vhdl/whatever simulators
> in with gdb. Usually such setups are
> only provided for a pretty penny to
> early customers of a new chip.
>

I am ultimately interested in this
subject but it is a bit overkill for
the current project that I am
attempting to undertake.

If you know of anything that even comes
close to filling my requirements under
Linux, please let me know as I have not
been successful so far in finding
anything through Google, etc.

Thanks,

-- 
Parts of original message omitted when
not needed - see thread.
mlewis00@nospam.tctwest.no.com.net.wrap^


Relevant Pages

  • Re: Development / Debugging tools - advice needed.
    ... > command to make gdb show stuff in ... comparison to Linux as an OS. ... that the reason that Turbo Debugger ... control of the hardware away from it, ...
    (comp.os.linux.development.system)
  • Re: debugging under linux
    ... > I need something like the MSVC debugger for linux, ... Most debuggers under Linux are gdb based. ... there is a patch to script GDB with Perl. ...
    (comp.os.linux.development.system)
  • Re: debugging under linux
    ... >>gdb is just too much work to use and too primitive. ... > How do you expect the debugger to know which numbers are supposed to ... but sure, I want to debug my program, not write a linux debugger... ... >>displaying the disassembly in one window, the registers ...
    (comp.os.linux.development.system)
  • Re: debugging under linux
    ... jacob navia wrote: ... > gdb is just too much work to use. ... > I need something like the MSVC debugger for linux, ...
    (comp.lang.asm.x86)
  • Re: A cross-platform vision for Delphi
    ... I need a GUI I can load up in ... Linux, to find why all that Linux specific code is not working. ... And if you have a remote debugger? ...
    (borland.public.delphi.non-technical)