* [patch] document that check_typedef can throw an exception
@ 2011-10-27 22:03 Doug Evans
2011-10-28 3:40 ` Jan Kratochvil
0 siblings, 1 reply; 3+ messages in thread
From: Doug Evans @ 2011-10-27 22:03 UTC (permalink / raw)
To: gdb-patches, jan.kratochvil
Hi.
I will check this in in a few days if there are no objections.
2011-10-27 Doug Evans <dje@google.com>
* gdbtypes.c (check_typedef): Document that this function can
throw an exception.
Index: gdbtypes.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbtypes.c,v
retrieving revision 1.220
diff -u -p -r1.220 gdbtypes.c
--- gdbtypes.c 14 Oct 2011 20:22:17 -0000 1.220
+++ gdbtypes.c 27 Oct 2011 21:53:52 -0000
@@ -1454,6 +1454,9 @@ stub_noname_complaint (void)
not been computed and we're either in the middle of reading symbols, or
there was no name for the typedef in the debug info.
+ NOTE: Lookup of types for opaque types can throw some errors during
+ invalid symbol files. Thus this function can throw an exception.
+
If TYPE is a TYPE_CODE_TYPEDEF, its length is updated to the length of
the target type.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [patch] document that check_typedef can throw an exception
2011-10-27 22:03 [patch] document that check_typedef can throw an exception Doug Evans
@ 2011-10-28 3:40 ` Jan Kratochvil
2011-11-10 8:05 ` Doug Evans
0 siblings, 1 reply; 3+ messages in thread
From: Jan Kratochvil @ 2011-10-28 3:40 UTC (permalink / raw)
To: Doug Evans; +Cc: gdb-patches
On Thu, 27 Oct 2011 23:55:51 +0200, Doug Evans wrote:
[...]
> * gdbtypes.c (check_typedef): Document that this function can
> throw an exception.
[...]
> + NOTE: Lookup of types for opaque types can throw some errors during
> + invalid symbol files. Thus this function can throw an exception.
Always by expanding opaque types:
Either lookup_symbol_aux_quick:
error (_("\
Internal: %s symbol `%s' found in %s psymtab but not in symtab.\n\
which is not completely correct but it was commonly happenning and it still
may happen.
Or just RETURN_QUIT from new CUs being expanded
...->dwarf2_compute_name->c_print_type->... (there some QUIT; statements).
Regards,
Jan
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [patch] document that check_typedef can throw an exception
2011-10-28 3:40 ` Jan Kratochvil
@ 2011-11-10 8:05 ` Doug Evans
0 siblings, 0 replies; 3+ messages in thread
From: Doug Evans @ 2011-11-10 8:05 UTC (permalink / raw)
To: Jan Kratochvil; +Cc: gdb-patches
On Thu, Oct 27, 2011 at 7:09 PM, Jan Kratochvil
<jan.kratochvil@redhat.com> wrote:
> On Thu, 27 Oct 2011 23:55:51 +0200, Doug Evans wrote:
> [...]
>> * gdbtypes.c (check_typedef): Document that this function can
>> throw an exception.
> [...]
>> + NOTE: Lookup of types for opaque types can throw some errors during
>> + invalid symbol files. Thus this function can throw an exception.
>
> Always by expanding opaque types:
>
> Either lookup_symbol_aux_quick:
> error (_("\
> Internal: %s symbol `%s' found in %s psymtab but not in symtab.\n\
> which is not completely correct but it was commonly happenning and it still
> may happen.
>
> Or just RETURN_QUIT from new CUs being expanded
> ...->dwarf2_compute_name->c_print_type->... (there some QUIT; statements).
I committed this.
2011-11-09 Doug Evans <dje@google.com>
* gdbtypes.c (check_typedef): Document that this function can
throw an exception.
Index: gdbtypes.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbtypes.c,v
retrieving revision 1.220
diff -u -p -r1.220 gdbtypes.c
--- gdbtypes.c 14 Oct 2011 20:22:17 -0000 1.220
+++ gdbtypes.c 10 Nov 2011 06:53:09 -0000
@@ -1454,6 +1454,10 @@ stub_noname_complaint (void)
not been computed and we're either in the middle of reading symbols, or
there was no name for the typedef in the debug info.
+ NOTE: Lookup of opaque types can throw errors for invalid symbol files.
+ QUITs in the symbol reading code can also throw.
+ Thus this function can throw an exception.
+
If TYPE is a TYPE_CODE_TYPEDEF, its length is updated to the length of
the target type.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-11-10 8:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-27 22:03 [patch] document that check_typedef can throw an exception Doug Evans
2011-10-28 3:40 ` Jan Kratochvil
2011-11-10 8:05 ` Doug Evans
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox