* [INSIGHT] source code lines mismatch
@ 2001-11-07 7:31 Hugo Villeneuve
0 siblings, 0 replies; 2+ messages in thread
From: Hugo Villeneuve @ 2001-11-07 7:31 UTC (permalink / raw)
To: Red Hat Insight
Hi,
I don't know if it's a GDB or Insight issue, but when I do my
debugging, in the main function, I'm calling two functions:
int main( void)
{
InitializeArmRegisters();
InitializeArmPeriph();
return EXIT_SUCCESS;
}
The two functions inside main are in a separate file
(Source/hardware_initialization.c)
I set a breakpoint on each function inside main. When I step into the
"InitializeArmRegisters()" function, I see on the console:
InitializeArmRegisters () at Source/hardware_initialization.c:33
When I run into the second breakpoint, and I do a step, I see on the
console:
0x00102224 in InitializeArmPeriph () at
Source/hardware_initialization.c:33
I don't understand why the two functions have the same line number? (I
can't trace because of that)
Hugo Villeneuve
--------------------------------------
Hugo Villeneuve
Hardware/Firmware Developer
SoftAcoustik Inc.
(418) 521-1515
hvilleneuve@softacoustik.com
http://www.softacoustik.com
--------------------------------------
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [INSIGHT] source code lines mismatch
[not found] <200111071535.HAA21400@cygnus.com>
@ 2001-11-07 7:46 ` Fernando Nasser
0 siblings, 0 replies; 2+ messages in thread
From: Fernando Nasser @ 2001-11-07 7:46 UTC (permalink / raw)
To: hvilleneuve; +Cc: Red Hat Insight
Hugo Villeneuve wrote:
>
> Hi,
>
> I don't know if it's a GDB or Insight issue, but when I do my
Try it with gdb -nw and see what happens. But I bet it is gdb (or gcc)
because the GUI rely on it (them) for the symbolic information.
See my comments below.
> debugging, in the main function, I'm calling two functions:
>
> int main( void)
> {
> InitializeArmRegisters();
> InitializeArmPeriph();
> return EXIT_SUCCESS;
> }
>
> The two functions inside main are in a separate file
> (Source/hardware_initialization.c)
>
> I set a breakpoint on each function inside main. When I step into the
> "InitializeArmRegisters()" function, I see on the console:
>
> InitializeArmRegisters () at Source/hardware_initialization.c:33
>
> When I run into the second breakpoint, and I do a step, I see on the
> console:
>
> 0x00102224 in InitializeArmPeriph () at
^^^^^^^^^^
gdb thinks you've stopped in the middle of a source line.
> Source/hardware_initialization.c:33
>
> I don't understand why the two functions have the same line number? (I
> can't trace because of that)
>
Which version of gdb are you using? Also, have you compiled your
program
with optimization?
Things to try, in order:
Compile without optimization.
A recent version of gdb.
A different version of gcc (the compiler creates the line number info).
--
Fernando Nasser
Red Hat Canada Ltd. E-Mail: fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario M4P 2C9
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2001-11-07 7:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-11-07 7:31 [INSIGHT] source code lines mismatch Hugo Villeneuve
[not found] <200111071535.HAA21400@cygnus.com>
2001-11-07 7:46 ` Fernando Nasser
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).