Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Jason Merrill <jason@redhat.com>
To: Per Bothner <per@bothner.com>
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	[thread overview]
Message-ID: <u9elxvlebv.fsf@casey.cambridge.redhat.com> (raw)
In-Reply-To: <m2d7dg1mnt.fsf@kelso.bothner.com>

>>>>> "Per" == Per Bothner <per@bothner.com> 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 \x03joel.brenner@tchip.com Mon Jan 29 08:34:00 2001
From: Joel Brenner <\x03joel.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: <OFC19A9A36.829A7E77-ON802569DF.0048275F@Symbian.com>
X-SW-Source: 2001-01/msg00201.html
Content-length: 3005

Nicolas.Thery@Symbian.com wrote:

> Joel Brenner <\x03joel.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 <MainApp>: mov r12, sp
    0x100c54 <MainApp+4>: stmdb sp!, {r11, r12, lr, pc}
    0x100c58 <MainApp+8>: sub r11, r12, #4 ; 0x4
    0x100c5c <MainApp+12>: bl 0x10143c <__thumb_func_from_arm>
    0x100c60 <MainApp+16>: b 0x100c5c <MainApp+12>
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 <thumb_func>: push {lr}
    0x100efe <thumb_func+2>: mov r3, #0
    0x100f00 <thumb_func+4>: add r3, #1
    0x100f02 <thumb_func+6>: lsl r3, r3, #24
    0x100f04 <thumb_func+8>: lsr r3, r3, #24
    0x100f06 <thumb_func+10>: cmp r3, #3
    0x100f08 <thumb_func+12>: bls 0x100f00 <thumb_func+4>
    0x100f0a <thumb_func+14>: pop {r0}
    0x100f0c <thumb_func+16>: 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


       reply	other threads:[~2001-01-29  4:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <m2d7dg1mnt.fsf@kelso.bothner.com>
2001-01-29  4:54 ` Jason Merrill [this message]
2001-01-29 12:18   ` Trond Eivind Glomsrød

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=u9elxvlebv.fsf@casey.cambridge.redhat.com \
    --to=jason@redhat.com \
    --cc=gcc-sc@goof.com \
    --cc=gdb@sources.redhat.com \
    --cc=per@bothner.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox