Thread View: gnu.gdb.bug
2 messages
2 total messages
Started by Robert R. Henry
Tue, 27 Oct 1992 22:54
gdb4.7 botches(?)
Author: Robert R. Henry
Date: Tue, 27 Oct 1992 22:54
Date: Tue, 27 Oct 1992 22:54
17 lines
1198 bytes
1198 bytes
In gdb4.7 (sparc target, sparc host), built to run with gcc2.2.2 with some modifications to dbxout.c, I note these problems. 1: Inside of a member function, the class members are not implicitly reachable; instead of saying "print x", one must say "print this->x". Is this a bug or a feature? 2: I can not put a breakpoint on the destructor for Thing, eg on Thing::~Thing; the breakpoint ends up on the constructor Thing::Thing instead. This may be because my name mangling configuration (both in gcc2.2.2/dbxout.c and in gdb4.7(GCC_MANGLE_BUG)) may be screwed up. (My version of gcc2.2.2/dbxout.c has undergone several patches from the net, as well as gdb/gcc.patch) 3: othergdb4.7 users on site who are debugging big programs complain that 'where' takes several minutes to complete.
gdb 4.7 coredump
Author: Alexander Klaiber
Date: Thu, 29 Oct 1992 22:58
Date: Thu, 29 Oct 1992 22:58
21 lines
1499 bytes
1499 bytes
line 238 in "infcmd.c" reads
printf_filtered ("Starting program: %s %s\n",
exec_file? exec_file: "", inferior_args);
although the restrictions on {printf_filtered} clearly state strict size
limitations on the string to be printed. If the args corresponding to the "%s"s in
the format are long strings (e.g. over 255 chars, which happens easily if you have
long pathnames as arguments), gdb will corrupt its stack and die.
FIX: use {fputs_filtered} and "manually" print each argument:
fputs_filtered("Starting program: ", stdout);
if (exec_file) fputs_filtered(exec_file, stdout);
fputs_filtered(" ", stdout);
fputs_filtered(inferior_args, stdout);
fputs_filtered("\n", stdout);
Or do what older versions of gdb used to do (up to 4.7), namely just use
{printf} instead of {printf_filtered}. Or someone could fix {vfprintf_filtered}...
Alex
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads