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: Can't set architecture to m32c on m32c-elf-gdb.


Hello Nick,

It might you feel you could set architecture to m32c,
BFD (bfd_default_scan) returns arch_info for m16c always.
This is the point.


Please try 'print $dma0' on GDB (w/o my patch).

(gdb) show architecture
The target architecture is set automatically (currently m16c)
(gdb) set architecture m32c
The target architecture is assumed to be m32c
(gdb) show architecture
The target architecture is assumed to be m32c
(gdb) print $dma0
$1 = void

dma0 is a register supported by m32c only.
So the result of 'print $dma0' is ...
In case m32c, it should be 'No registers.'
In case m16c, it should be ''void' since it doesn't have dma0 register.


Thanks,

On 2010/01/07, at 0:17, Nick Clifton wrote:

> Hi Masaki,
> 
>> Really did you try them? Here is a log of my GDB.
>> (gdb) show architecture
>> The target architecture is set automatically (currently m16c)
>> (gdb) set architecture m32c:m32c
>> Undefined item: "m32c:m32c".
>> (gdb) set architecture m32c:m16c
>> Undefined item: "m32c:m16c".
> 
> Point.  But when I try this:
> 
> (gdb) show architecture
> The target architecture is set automatically (currently m16c)
> (gdb) set architecture m32c
> The target architecture is assumed to be m32c
> (gdb) show architecture
> The target architecture is assumed to be m32c
> (gdb) set architecture m16c
> The target architecture is assumed to be m16c
> (gdb) show architecture
> The target architecture is assumed to be m16c
> 
> So it appears that you can set the architecture to m32c, yes ?
> 
> Cheers
>  Nick
> 



--
Masaki Muranaka
Monami software



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