Problems with the debug information and C++
Sebastian Huber
sebastian.huber at embedded-brains.de
Thu Jan 22 13:28:27 UTC 2009
Hi,
I wrote some small test programs to reproduce the problem. They depend only on
the RTEMS tools and not a particular BSP (recent RPMs for OpenSUSE 11.1).
Sebastian Huber wrote:
> Hi,
>
> during the change from GCC 4.2.4 to 4.3.2 something happened with the
> debug information (example output for PSIM iostream sample):
>
> Version 4.8:
>
> /opt/rtems-4.8/powerpc-rtems4.8/psim/lib/rtems-4.8/tests
>
> powerpc-rtems4.10-objdump -W iostream.exe > /dev/null
>
> powerpc-rtems4.10-objdump: Warning: There is a hole [0x343e6 - 0x343fd]
> in .debug_loc section.
Test source (test.cpp):
#include <iostream>
extern "C" {
_ssize_t write( int, const void*, size_t)
{
return 0;
}
void fstat()
{
/* VOID */
}
off_t lseek( int, off_t, int)
{
return 0;
}
_ssize_t read( int, void*, size_t)
{
return 0;
}
void _start()
{
/* VOID */
}
}
Command line:
powerpc-rtems4.8-gcc test.cpp -lstdc++ && objdump -W a.out > /dev/null
Output:
Like in the previous mail.
> Version 4.9:
>
> /opt/rtems-4.9/powerpc-rtems4.9/psim/lib/rtems-4.9/tests
>
> powerpc-rtems4.10-objdump -W cxx_iostream.exe > /dev/null
>
> powerpc-rtems4.10-objdump: Error: Range lists in .debug_info section
> aren't in ascending order!
> powerpc-rtems4.10-objdump: Warning: There is a hole [0x230 - 0x640] in
> .debug_ranges section.
> powerpc-rtems4.10-objdump: Warning: There is an overlap [0x730 - 0x230]
> in .debug_ranges section.
Test source (test.cpp):
#include <iostream>
extern "C" {
_ssize_t write( int, const void*, size_t)
{
return 0;
}
void fstat()
{
/* VOID */
}
off_t lseek( int, off_t, int)
{
return 0;
}
_ssize_t read( int, void*, size_t)
{
return 0;
}
void _start()
{
/* VOID */
}
}
Command line:
powerpc-rtems4.9-gcc test.cpp -lstdc++ && objdump -W a.out > /dev/null
Output:
Like in the previous mail.
> Version CVS HEAD:
>
> /opt/rtems-4.10/powerpc-rtems4.10/psim/lib/rtems-4.10/tests
>
> powerpc-rtems4.10-objdump -W cxx_iostream.exe > /dev/null
>
> powerpc-rtems4.10-objdump: Error: Range lists in .debug_info section
> aren't in ascending order!
> powerpc-rtems4.10-objdump: Warning: There is a hole [0x230 - 0x640] in
> .debug_ranges section.
> powerpc-rtems4.10-objdump: Warning: There is an overlap [0x730 - 0x230]
> in .debug_ranges section.
Test source (test.cpp):
#include <iostream>
extern "C" {
void _start()
{
/* VOID */
}
}
Command line:
powerpc-rtems4.10-gcc test.cpp -lstdc++ && objdump -W a.out > /dev/null
Output:
Like in the previous mail.
> There are many more warnings but they differ only in the numbers. The
> error and the overlap warning is new in 4.9 and CVS HEAD. I noticed
> this also on m68k. Is this something that may cause harm?
One of our customers reported that he cannot debug his application with his
debugger. The support of the debugger vendor confirmed problem reports from
various customers with GCC version 4.3.2. Does anyone know if this is more
likely a RTEMS or GCC problem? I am unsure if I should write a GCC bug report.
--
Sebastian Huber, Embedded Brains GmbH
Address : Obere Lagerstr. 30, D-82178 Puchheim, Germany
Phone : +49 89 18 90 80 79-6
Fax : +49 89 18 90 80 79-9
E-Mail : sebastian.huber at embedded-brains.de
PGP : Public key available on request
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
More information about the users
mailing list