This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v2 2/3] gdb/python: raise TypeError instead of abort on calling value method for label symbol object


Hi, Phil.

> So, it doesn’t look like some deeper problem in GDB for me, just incompleteness of Python API.
> There is very similar “if” condition for LOC_TYPEDEF in patched code.

I’ve inspected code some more. It seems to me there is a bug in gdb/findvar.c:466.
According to gdb/mdebugread.c:694, it is pretty clear that label symbol always has type of builtin integer:
SYMBOL_TYPE (s) = objfile_type (objfile)->builtin_int;

but store_typed_address expects TYPE_CODE_PTR or TYPE_CODE_REF, so instead of
store_typed_address there should be something like store_unsigned_integer.

Am I correct with my guess?

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]