From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jason Merrill To: Per Bothner Cc: gcc-sc@goof.com, gdb@sources.redhat.com Subject: Re: Status of Gdb support for new ABI? Date: Mon, 29 Jan 2001 04:54:00 -0000 Message-id: References: X-SW-Source: 2001-01/msg00200.html >>>>> "Per" == Per Bothner writes: > How well does Gdb handle the new ABI? This is actually two questions: > (1) How well does cvs trunk of Gdb handle the new ABI? It handles the mangling properly. I don't think there is any specific support for the new ABI object model yet, and the dwarf2 output hasn't yet been expanded to give the debugger a more complete idea of, say, how to find virtual bases. > (2) How well does the current Gdb release handle the new ABI? It doesn't handle the new mangling at all. > I'm guessing that the answer to (1) is 'ok' and that of (2) is 'not'. > One could argue that it is not acceptable for the current Gdb to > be unable to (reasonably) debug C++ programs generated by the current Gcc. > The implication is: We need to make sure Gdb 5.1 is released on > or before GCC 3.0 is released. Is this possible? Am I wrong? If necessary, we could make a minor release of GDB that just updates the demangler. That would be pretty straightforward. Jason >From joel.brenner@tchip.com Mon Jan 29 08:34:00 2001 From: Joel Brenner <joel.brenner@tchip.com> To: Nicolas.Thery@Symbian.com Cc: gdb@sources.redhat.com Subject: Re: Does GDB suports mixed ARM_code (ARM+Thumb) debugging? Date: Mon, 29 Jan 2001 08:34:00 -0000 Message-id: <3A759BB1.A496464E@tchip.com> References: X-SW-Source: 2001-01/msg00201.html Content-length: 3005 Nicolas.Thery@Symbian.com wrote: > Joel Brenner <joel.brenner@tchip.com> wrote: > > > does gdb 2.95.2 configured for arm-elf supports debuggin of objects > > generated by linking together ARM-code (32 bit) and Thumb-code (16 bit)? > > GDB 4.17 does. So I guess more recent versions do too. > > ******************************************************************************************************************* > Symbian Limited (Co.No.3173352) Registered Office: Sentinel House, 16 Harcourt Street, London, W1H 4AD, UK. > This message is intended only for use by the named addressee and may contain privileged and/or confidential information. If you are not the named addressee you should not disseminate, copy or take any action in reliance on it. If you have received this message in error please notify postmaster@symbian.com and delete the message and any attachments accompanying it immediately. Symbian does not accept liability for any corruption, interception, amendment, tampering or viruses occuring to this message in transit or for any message sent by its employees which is not in compliance with Symbian corporate policy. > ******************************************************************************************************************* I've now installed gcc-20010122 to generate thumb-code and it works. At debugging time (gdb 5.0) there are some problems. ARM-code compiled with -c -g -O2 -mcpu=arm7tdmi -mthumb-interwork and placed ad address (00100c50 g F .text 00000014 MainApp) int MainApp( void ) { for (;;) { thumb_func(); }; return(TRUE); } Dump of assembler code for function MainApp: 0x100c50 : mov r12, sp 0x100c54 : stmdb sp!, {r11, r12, lr, pc} 0x100c58 : sub r11, r12, #4 ; 0x4 0x100c5c : bl 0x10143c <__thumb_func_from_arm> 0x100c60 : b 0x100c5c End of assembler dump. Thumb-code compiled with -c -g -O2 -mcpu=arm7tdmi -mthumb -mthumb-interwork and placed at address(00100ef4 g .text 00000012 thumb_func) void thumb_func(void) { unsigned char channel; for(channel=0;channel < 4; channel ++); } Dump of assembler code for function thumb_func: 0x100efc : push {lr} 0x100efe : mov r3, #0 0x100f00 : add r3, #1 0x100f02 : lsl r3, r3, #24 0x100f04 : lsr r3, r3, #24 0x100f06 : cmp r3, #3 0x100f08 : bls 0x100f00 0x100f0a : pop {r0} 0x100f0c : bx r0 End of assembler dump. If I begin a dubugging session with gdb there are no preblems if I never try to enter (step) in Thumb_func(), if I do this gdb never comes bak. My questions are: -are the compilation flags the right one? -can I'use a standard linker script or a midified one for interworking conde? -where is the problem ? -gdb automaticly swith betwen 16 and 32 bit code ? tanks joel brenner