using gdb
Jerry Feldman
gaf at blu.org
Fri Jul 12 16:19:28 EDT 2002
Brad,
Are you referring to pointers?
Most debuggers don't provide this information directly. However, you can
set up watchpoints on the address you think may be corrupted.
Also, in C, you can easily write data into an array and exceed the bounds
of that array.
Another frequent problem is that you can allocate memory using malloc, then
free that memory, but nothing stops you from writing into that memory until
you step on an address, and the dereference of that address causes a
segfault.
You also should look into DDD. DDD uses gdb, but gives you a graphical
display. I found ddd immensely useful when debugging a database program I
was working on.
Brad Noyes wrote:
> Hi All,
> is there a way, in gdb, to get a list of varibles that point to a particular
> address? I think i might have two, or more, varibles pointing to the same
> address, and is causing strange behavior.
--
Jerry Feldman <gaf at blu.org>
Boston Linux and Unix user group
http://www.blu.org PGP key id:C5061EA9
PGP Key fingerprint:053C 73EC 3AC1 5C44 3E14 9245 FB00 3ED5 C506 1EA9
More information about the Discuss
mailing list