Ang Beepeng | 2 Jul 2009 15:06
Picon
Favicon

Debug a dll


Hi.

I wish to know if gdb can be use to debug a dll, and how to debug a dll with
gdb? Any recommended page to learn on this matter?

Thanks.

Ang Beepeng
--

-- 
View this message in context: http://www.nabble.com/Debug-a-dll-tp24306387p24306387.html
Sent from the Gnu - gdb - General mailing list archive at Nabble.com.

Larry Evans | 8 Jul 2009 22:35

gdb cc1plus PACK_EXPANSION_PATTERN(result) gives 'No symbol "__extension__"' error msg

The gcc compiler was compiled with -g3 -O0' compiler flags to enable 
invocation of macros during a gdb session; however, the
macro,  PACK_EXPANSION_PATTERN, apparently uses a symbol:

   __extension__

not understood by gdb.  How can gdb be made to understand
__extension__?

More specifically, while in pt.c:

http://gcc.gnu.org/viewcvs/trunk/gcc/cp/pt.c?revision=149351&view=markup

at around line 2671, I got:

(gdb) p PACK_EXPANSION_PATTERN(result)
No symbol "__extension__" in current context.
(gdb)

Now, I could use 'macro exp' as follows:

(gdb) macro exp PACK_EXPANSION_PATTERN(result)
expands to: (((enum tree_code) (result)->base.code) == 
TYPE_PACK_EXPANSION? __extension__ (*({__typeof (result) const __t = 
(result); &__t->common.type; })) : __extension__ (*({__typeof (result) 
const __t = __extension__ ({ __typeof (result) const __t = (result); 
char const __c = tree_code_type[(int) (((enum tree_code) 
(__t)->base.code))]; if (!((__c) >= tcc_reference && (__c) <= 
tcc_expression)) tree_class_check_failed (__t, tcc_expression, __FILE__, 
__LINE__, __FUNCTION__); __t; }); const int __i = (0); if (__i < 0 || 
(Continue reading)

Larry Evans | 9 Jul 2009 01:02

Re: gdb cc1plus PACK_EXPANSION_PATTERN(result) gives 'No symbol "__extension__"' error msg

On 07/08/09 15:35, Larry Evans wrote:
> The gcc compiler was compiled with -g3 -O0' compiler flags to enable 
> invocation of macros during a gdb session; however, the
> macro,  PACK_EXPANSION_PATTERN, apparently uses a symbol:
> 
>   __extension__
> 
> not understood by gdb.  How can gdb be made to understand
> __extension__?
[snip]
I guess not:

   http://article.gmane.org/gmane.comp.gcc.devel/107339

Rohit Girme | 22 Jul 2009 22:48
Picon
Favicon

Regarding remote debugging of Freescale MCF 5485 board using gdbserver

Hello,

I have installed Eclipse CDT, CodeSourcery G++ toolchain on Linux host. I am using the Code Sourcery Eclipse IDE. I have installed Linux kernel using Linux Target Image Builder from the Freescale site, onto the MCF5485 board. I have created a "helloworld" project on my Linux host using the Sourcery Eclipse IDE. I have copied the executables(like gdbserver,catchsgev etc) from the Sourcery folder onto the board in the root filesystem. I run the gdbserver on the board and then debug using TCP from my Linux machine. In the Sourcery Eclipse IDE I have specified sysroot on target as "/" because I have installed gdbserver in the root on the board(/root/bin). I have specified the IP address in the debug configuration in Eclipse while rest is default. I have selected the option "Translate sysroot pathnames" in the Shared Libraries tab in Debug Configurations

I start gdbsrver on board(gdbserver IP:port /pathname/to/executable) and then I launch debug configuration on Linux host. It stops at main() because of breakpoint. When I press resume it gives me the following error and the debugging stops without any output.

warning: .dynamic section for "C:\Program Files\CodeSourcery\Sourcery G++\m68k-linux-gnu\libc/lib/libc.so.6" is not at the expected address (wrong library or version mismatch?)

Stopped due to shared library event

Stopped due to shared library event

Stopped due to shared library event

My program is as follows:

include

int main(void) { int i=0; printf("Hello = %d",i); return 0; }

I read on some forum that I need to set sysroot but I also read that if I have installed sysroot in the root filesystem on the board I do not need to do anything. Please help me out as I have been stuck here for a long time.

Thank you,

Rohit

Rohit Girme | 23 Jul 2009 19:59
Picon
Favicon

Re: Regarding remote debugging of Freescale MCF 5485 board using gdbserver

Hello,

I was told by CodeSourcery that the above warning/error was because of the following.

The Sourcery G++ libraries must be installed on the target either in the file system or in another location.

The warning indicates that Sourcery IDE and application do not agree about which shared libraries are being used by application.

I have the required libraries on my host machine. But how do I install them on the target board? Please can somebody tell me that?

Thanks,

Rohit



On Wed, Jul 22, 2009 at 1:48 PM, Rohit Girme <rgirme <at> asu.edu> wrote:

Hello,

I have installed Eclipse CDT, CodeSourcery G++ toolchain on Linux host. I am using the Code Sourcery Eclipse IDE. I have installed Linux kernel using Linux Target Image Builder from the Freescale site, onto the MCF5485 board. I have created a "helloworld" project on my Linux host using the Sourcery Eclipse IDE. I have copied the executables(like gdbserver,catchsgev etc) from the Sourcery folder onto the board in the root filesystem. I run the gdbserver on the board and then debug using TCP from my Linux machine. In the Sourcery Eclipse IDE I have specified sysroot on target as "/" because I have installed gdbserver in the root on the board(/root/bin). I have specified the IP address in the debug configuration in Eclipse while rest is default. I have selected the option "Translate sysroot pathnames" in the Shared Libraries tab in Debug Configurations

I start gdbsrver on board(gdbserver IP:port /pathname/to/executable) and then I launch debug configuration on Linux host. It stops at main() because of breakpoint. When I press resume it gives me the following error and the debugging stops without any output.

warning: .dynamic section for "C:\Program Files\CodeSourcery\Sourcery G++\m68k-linux-gnu\libc/lib/libc.so.6" is not at the expected address (wrong library or version mismatch?)

Stopped due to shared library event

Stopped due to shared library event

Stopped due to shared library event

My program is as follows:

include

int main(void) { int i=0; printf("Hello = %d",i); return 0; }

I read on some forum that I need to set sysroot but I also read that if I have installed sysroot in the root filesystem on the board I do not need to do anything. Please help me out as I have been stuck here for a long time.

Thank you,

Rohit



Gmane