From: Paul Koning <paul_koning@dell.com>
To: Josef Wolf <jw@raven.inka.de>
Cc: <gdb@sourceware.org>
Subject: Re: Gdb shows wrong line numbers for the sourcecode
Date: Mon, 20 Jun 2011 18:31:00 -0000 [thread overview]
Message-ID: <C1414247-6762-43E0-8097-57A0A7ADC499@dell.com> (raw)
In-Reply-To: <20110620173958.GA28683@raven.wolf.lan>
Probably the fact that your GDB is an antique.
I found that a version of GDB not nearly so out of date was unuseable with current GCC. Updated to the current (7.2) and all is well.
paul
On Jun 20, 2011, at 1:39 PM, Josef Wolf wrote:
> Hello,
>
> I have built a toolchain for ARM Cortex-M3 based on
>
> binutils-2.20
> gcc-4.4.3
> gdb-6.0
> openocd-0.4.0
>
> With this combination, gdb shows wrong line numbers and wrong lines in the
> source listings and in the backtrace like this:
>
> (gdb) bt
> #0 0x080004a6 in main (argc=536891392, argv=0x20005000) at main.c:45
> (gdb) cont
> Continuing.
>
> Breakpoint 2, 0x080003a4 in send_char (ch=19 '\023') at main.c:45
> 45 while (RCC_GetFlagStatus (RCC_FLAG_PLLRDY) == RESET) {
> (gdb) bt
> #0 0x080003a4 in send_char (ch=19 '\023') at main.c:45
> #1 0x080004ca in main (argc=536891392, argv=0x20005000) at main.c:45
>
> In reality, the main function begins at line 91 and the send_char function
> begins at line 84. The source code line shown at the breakpoint is a totally
> different function.
>
> Any ideas what could cause gdb to get confused?
next prev parent reply other threads:[~2011-06-20 18:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-20 17:40 Josef Wolf
2011-06-20 18:31 ` Paul Koning [this message]
2011-06-21 15:50 ` Josef Wolf
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=C1414247-6762-43E0-8097-57A0A7ADC499@dell.com \
--to=paul_koning@dell.com \
--cc=gdb@sourceware.org \
--cc=jw@raven.inka.de \
/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