sh-stub.c question

Michael Petzold MPetzold@ELSA.de
Wed Aug 25 07:02:00 GMT 1999


Hi,

I'm trying to get gdb remote debugging to work with a SH-2 target. The gdb
distribution contains already a sample remote stub, sh-stub.c, which I'm
currently adapting to my needs.

A problem I encountered is that the exception vector table (via exceptions())
isn't generated as is intended. The code doesn't even compile... Gcc
(egcs-2.91.57 cross NT -> sh) says for the occurences of
code_for_catch_exeception(x): "inconsistent operand constraints". By this it
means the three lines which deal with the int parameter 'n'. Is token merging
supposed to work also with assembler templates? But I think it's rather the "i"
constraint, that announces 'n' as a constant, which is irritating gcc.

I found no way to get this nice _inlining_ idea work - at last I sort of
manually unrolled the calls to code_for_catch_exeception ;-(
Are there some special compiler switches (apart from -O3) that I should employ?
Or something else?

Thanks + regards,
Michael.


____________________________________________________________

 Michael Petzold        Engineering Consumer Communcations
 ELSA AG
 Sonnenweg 11           Phone:   +49-(0)241-606-0
 52070 Aachen           Fax:     +49-(0)241-606-2099
 Germany                E-Mail:  MPetzold@elsa.de
____________________________________________________________





More information about the Gdb mailing list