Re: Debugging tools for inspecting the stack



On May 16, 11:23 pm, Randy Yates <y...@xxxxxxxx> wrote:
ErikWikström<eri...@xxxxxxxxxxxxxxxxxxx> writes:
As part of a small project in school I need to inspect the stack of a
running program in more detail than bt in gdb allows. What I'd like is
to get a dump of the memory containing the stack (preferably in some
nice hex output, and preferably while the program is still being
debugged). I don't need to be able to manipulate the memory but I need
to be able to inspect the layout of the stack and the values of
variables etc. on it.

Does anyone know of a tool that allows you to do these kinds of
things, any help would be appreciated.

ddd.

I've tried that (and while I'm no ddd expert) and it didn't seem to do
what I want any more than gdb (which is not so surprising since it's
just a front-end). What I want is something like what I can do in
Visual C++ under Windows, there I can have all the registers in one
window and the memory of the stack in another window (in a standard
hex view ie. each line starts with the address followed by the hex-
values for each byte and then ASCII representation) along with a third
window where I see the disassembly. And as I step through I can see
which registers/bytes in memory change.

It does not have to be so interactive but at the very least I need to
be able to dump the values to file between each instruction.

--
Erik Wikström

.



Relevant Pages

  • Re: Debugging tools for inspecting the stack
    ... running program in more detail than bt in gdb allows. ... to get a dump of the memory containing the stack (preferably in some ... I don't need to be able to manipulate the memory but I need ...
    (comp.os.linux.misc)
  • Re: WINDBG:Memory access error
    ... most of the times the minidump does not contain enough ... If you can reproduce the issue, switch to kernel memory dump. ... value assigned to all parameters of Driver Entry routine in the stack. ...
    (microsoft.public.development.device.drivers)
  • Re: made it to page 4 of gforth tutorial
    ... first require slowing all stack access in Forth by a hundred ... ten data stack cells and only nine cells on the return stack. ... stack to memory, then index into this dump, then load it back onto ... somewhere and/or a stack in memory. ...
    (comp.lang.forth)
  • Re: If Macs have no spyware....
    ... First you yammer about being a Mac advocate, then bad mouth me for dumping XP in favor of a Mac. ... Supposedly Microsoft had made a complete code review of its operating system and removed all the buffers which could overflow. ... the fundamental problem is that the basic architecture of Windows has two fatal flaws in its memory management and while these remain in the software the ad hoc patches will never be enough to make Windows a secure operating system. ... These problems are bad enough when dealing with data in the one routine but when the data exists on the stack, it can cause very large problems. ...
    (comp.sys.mac.advocacy)
  • Re: If Macs have no spyware....
    ... >had made a complete code review of its operating system and removed all ... and writing new data into those memory locations would ... >but when the data exists on the stack, it can cause very large problems. ... >location that needs to be written in place of the correct execution ...
    (comp.sys.mac.advocacy)