The bug seems to be
in SourceManager.java (package
org.eclipse.cdt.debug.mi.core.cdi).
In the method
toCDIType, we
return the type as Long for 32-bit values. Shouldnt this be Int
?
<snip>
// GDB has some special types for int
if (typename.equals("int8_t")) { //$NON-NLS-1$
return new CharType(target, typename);
} else if (typename.equals("int16_t")) {
//$NON-NLS-1$
return new ShortType(target, typename);
} else if (typename.equals("int32_t")) {
//$NON-NLS-1$
return new IntType(target,
typename); //
works
//return new LongType(target,
typename); // original code -
doesnt work
} else if (typename.equals("int64_t")) {
//$NON-NLS-1$
return new LongLongType(target, typename);
} else if (typename.equals("int128_t")) {
//$NON-NLS-1$
return new IntType(target, typename); // ????
}
</snip>
Thanks,
Sridhar
---
Sridhar
Sailappan,
Senior Software
Engineer,
Xilinx Inc,
San
Jose, CA
-----Original Message-----
From:
cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of
Mikhail Khodjaiants
Sent: Thursday, July 06, 2006 12:39 PM
To: CDT
General developers list.
Subject: Re: [cdt-dev] [Bug?] Signed registers in
registers view (nasty in hex)
Hi,
gdb has so-called "natural" format which is the
default format for the
Registers view. This means that signed is the
"natural" format for registers
in gdb.
Conversion to hex is done by CDT and is based on the
register's type and
endiannes, so this can be a bug in
CDT.
Thanks,
Mikhail Khodjaiants
----- Original Message -----
From: "Sascha Radike"
<sradike@xxxxxxxxxxxx>
To:
<cdt-dev@xxxxxxxxxxx>
Sent: Thursday, July 06, 2006 3:22
PM
Subject: [cdt-dev] [Bug?] Signed registers in
registers view (nasty in hex)
> Hi,
>
> I just had a look at the registers view (Eclipse
RC7 + CDT 3.2 HEAD two
> weeks ago or so, GDB 6.4) and noticed that
registers show up as signed (-1
> instead of
4294967295).
>
> I don't think this is a popular view for CPU
registers ?
>
> Anyway, it gets ugly when I use the hex view as
it shows up as long!
>
> Example:
> -4096 shows up as
0xfffffffffffff000
>
> The registers are only 32
bit.
>
> When I use the "Cast to type" to cast to
"unsigned int" it shows up
> correctly. But shouldn't the registers show up
correctly by default?
>
> CDT bug or GDB (once again)? Or am I just blind
?
>
> Thanks
>
> Sascha
>
>
_______________________________________________
> cdt-dev mailing list
> cdt-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/cdt-dev
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev