nhpr
10-22-2001, 08:38 PM
I tried to use GDB to find the exact hex value of the location of an array in the stack, but GDB just gave me an error. Are there any other programs that I could use for this task?
-Thanks
-Thanks
|
Click to See Complete Forum and Search --> : Finding address in memory of an array nhpr 10-22-2001, 08:38 PM I tried to use GDB to find the exact hex value of the location of an array in the stack, but GDB just gave me an error. Are there any other programs that I could use for this task? -Thanks pinoy 10-23-2001, 04:48 AM Use x/FMT ADDRESS. e.g. int main() { char buf[] = "Hello, World\n"; return 0; } $ gcc -o try try.c -g $ gdb try (gdb) b main (gdb) r (gdb) x/s buf (gdb) x/5c buf (gdb) x/x3 buf gdb is pretty powerful, but it sucks at the interface side. There are some front-ends out there, e.g. DDD but they're buggy as hell (last time I tried it anyway, about 3 years ago). Visual Studio is so much better at the debugger side of things. bwkaz 10-23-2001, 07:52 AM DDD is still kinda buggy. Like, on its dialog boxes, the last line of text is usually repeated. And sometimes it just completely screws with the instance of GDB that it runs for you -- actually, I have only seen this with JDB, now that I think of it. So maybe GDB has better support. justlinux.com
Copyright Internet.com Inc. All Rights Reserved. |