This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: Patch: printing java `char' values
>>>>> "Daniel" == Daniel Jacobowitz <drow@mvista.com> writes:
Daniel> Soemthing interesting is going on here... I'd like to know how
Daniel> it works in the stabs case. Tom, could you compile your test
Daniel> with -gstabs+ and step through the char printing code? When I
Daniel> do that, 'c' has TYPE_CODE_CHAR set anyway, even though the
Daniel> stabs reader marked it as TYPE_CODE_INT. It'd be nice to
Daniel> figure out where that magic happens.
When I use -gstabs+ the type looks like this:
(gdb) p *type
$1 = {
code = TYPE_CODE_CHAR,
name = 0x83e6574 "char",
tag_name = 0x0,
length = 2,
upper_bound_type = 0,
lower_bound_type = 0,
objfile = 0x0,
target_type = 0x0,
pointer_type = 0x0,
reference_type = 0x0,
cv_type = 0x83d4980,
as_type = 0x83d4980,
flags = 1,
nfields = 0,
fields = 0x0,
vptr_basetype = 0x0,
vptr_fieldno = -1,
type_specific = {
arg_types = 0x0,
cplus_stuff = 0x0,
floatformat = 0x0
}
}
HTH,
Tom