From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eli Zaretskii To: Zack Weinberg Cc: dberlin@redhat.com, gdb-patches@sources.redhat.com Subject: Re: Option to elide single-bit bitfields when printing structures Date: Sat, 24 Feb 2001 23:53:00 -0000 Message-id: References: <20010224131046.E13956@wolery.stanford.edu> X-SW-Source: 2001-02/msg00462.html On Sat, 24 Feb 2001, Zack Weinberg wrote: > > Then IMHO this feature is less helpful than it could be. See the list > > above: can you really remember all of the flags if they are not shown? > > And if half of them are shown, is it really easy to know which are and > > which aren't? > > Perhaps you are not familiar with the way these flags get used in gcc. I thought you were proposing a general-purpose feature, not something specific to GCC. If this is GCC-specific, I tend to agree with Michael: throw together a bunch of special-purpose commands using the GDB scripting facilities, put them on .gdbinit distributed with GCC, and be done with it. That's what Emacs does, for example. > GCC already has a prettyprinter you can call from the debugger for > these things, which obeys the same convention. The problem with it is > that if the structure is damaged, the prettyprinter is liable to > crash. Perhaps it would be better to make the GCC prettyprinter more robust in the face of such calamities. After all, GDB doesn't do anything that any other program cannot do, to avoid crashing when accessing invalid addresses and corrupted data structures.