From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Snyder To: Mark Kettenis Cc: msnyder@redhat.com, gdb-patches@sources.redhat.com Subject: Re: [PATCH] Fix i386 FPU register conversion code Date: Mon, 30 Jul 2001 10:35:00 -0000 Message-id: <3B659A08.9EC51236@cygnus.com> References: <200107281649.f6SGn6w19068@delius.kettenis.local> <3B6316FC.7D86@redhat.com> <200107282053.f6SKrMn19253@delius.kettenis.local> X-SW-Source: 2001-07/msg00718.html Mark Kettenis wrote: > > Date: Sat, 28 Jul 2001 12:48:12 -0700 > From: Michael Snyder > > Mark Kettenis wrote: > > > > Fixing the debug register number mapping scheme uncovered a bug in > > i386-tdep.c:i386_register_convert_to_virtual(). Fixed with the > > attached patch. > > > > Mark > > Isn't "gdb_assert" rather strong for this use? > Seems like simply returning without doing anything > would be sufficient in case we were called with an > integer register or what-not. Calling gdb_assert > will result in the user being asked if he would like > GDB to abort and dump core (I think...) > > Hmm, when I added the assertion, I was under the impression that if > the virtual type wasn't a floating-point type it would be a GDB > internal error, hence the gdb_assert. However, this is probably not > entirely true, since I now think that bogus debug information (e.g. a > stab that says that an integer variable that lives in a > floating-point register) might trip the assertion. Printing a warning > and returning without doing anything is probably better. Even if it is an internal error, it isn't necessarily a fatal one. Assert is a fatal error, isn't it? I just think that some errors are recoverable or ignorable, and might just warant a warning (or a silent ignore).