Jayasri Sangu | 1 Aug 02:09 2007

debugging the multithreads on PPC embedded platfom

Hi,

    I am using gdb-6.6,and trying to do remote debugging of
multithreaded application.

On the borad I am running the commnad 
	  ./gdbserver-6.6  localhost:12345 --attach 190 &

And on from my linux system I am starting the gdb 

./gdb-6.6 EclipseMSW.elf
GNU gdb 6.6
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for
details.
This GDB was configured as "--host=i686-pc-linux-gnu
--target=powerpc-linux"...0x3000f430 in ?? ()
(gdb)

Why I am getting 0x3000f430 in ?? ()?  

Thanks
Jayasri

(Continue reading)

congli | 1 Aug 03:26 2007
Picon

Re: Why does gdb implement 'next' command with a series of "vCont;s"?

I got it. Thanks!

 > GDB does not know what the instructions between here and there do.
 > One of them might be a branch or a function call.
 >
 > --
 > Daniel Jacobowitz
 > CodeSourcery

Eli Zaretskii | 1 Aug 05:15 2007
Picon

Re: debugging the multithreads on PPC embedded platfom

> Date: Tue, 31 Jul 2007 17:09:58 -0700
> From: "Jayasri Sangu" <JayasriS <at> aaesys.com>
> 
> This GDB was configured as "--host=i686-pc-linux-gnu
> --target=powerpc-linux"...0x3000f430 in ?? ()
> (gdb)
> 
> 
> Why I am getting 0x3000f430 in ?? ()?  

One possibility is that this program was stripped, so there are no
symbols for GDB to show you, and it can only show addresses.

What happens if you type "bt"?  Can you get GDB to print any symbolic
function names if you type "finish" repeatedly?

Daniel Jacobowitz | 1 Aug 04:59 2007

Re: debugging the multithreads on PPC embedded platfom

On Tue, Jul 31, 2007 at 05:09:58PM -0700, Jayasri Sangu wrote:
> Why I am getting 0x3000f430 in ?? ()?  

Does it work after that?  Some versions of GDB display that prompt
before loading shared libraries.

If it still does not work, please read:
  http://sourceware.org/gdb/current/onlinedocs/gdb_16.html#SEC153
  http://sourceware.org/gdb/current/onlinedocs/gdb_18.html#SEC162

(In older versions of GDB it's "set solib-absolute-prefix" instead of
"set sysroot".)

--

-- 
Daniel Jacobowitz
CodeSourcery

Kalpana Ramamurthy | 1 Aug 06:44 2007
Picon

Re: gdb registers multiple definition of symbols : patch to fixthis

How do we verify the information generated by the compiler ? I wanted to see 
all the definitions
generated by the compiler for that symbol. How can I do that ? I couldn't 
decipher anything
with readelf and objdump.

Regards,
Kalpana
====

>From: Daniel Jacobowitz <drow <at> false.org>
>To: Kalpana Ramamurthy <kal_pana <at> hotmail.com>
>CC: gdb <at> sourceware.org, kalpana.balaji <at> symphonysv.com
>Subject: Re: gdb registers multiple definition of symbols : patch to 
>fixthis
>Date: Tue, 31 Jul 2007 08:02:44 -0400
>
>On Tue, Jul 31, 2007 at 11:53:23AM +0000, Kalpana Ramamurthy wrote:
> > Why this patch is required with the code is compiled with gcc 3.4.6 is
> > something that I still don't
> > know.
>
>It sounds to me like your compiler is generating bogus information.
>
>--
>Daniel Jacobowitz
>CodeSourcery

_________________________________________________________________
Real Estate classifieds on MSN - for free.www.yello.in 
(Continue reading)

Joel Brobecker | 1 Aug 08:44 2007

Re: GDB with Ada doesn't print variables neither works with GPS

> I've built my application like this:
> gnatmake -f -g hello
> And also tried:
> gnatmake -f -g -gnatdA -gnatdV hello
> What am I missing here?

Nothing. This is the proper way to build your program. But the compiler
you are using is producing incomplete debugging information. I get
the proper result when I use GNAT Pro (the compiler supported by Ada
Core).

This is confirmed by:

> > What does ptype Hello_String.all say? It should say "array of
> > character". If it doesn't then, the GDB output is expected.
> 
> 
> For these variables I get:
> 
> Hello_String: constant STRING := "Hello, world! - string variable";
> (gdb) ptype Hello_String
> type = array (1 .. 31) of <1-byte integer>
> 
> Bye_String : String_Access := new String'("Bye! - string access");
> (gdb) ptype Bye_String
> type = array (<>) of <1-byte integer>

This confirms that the debugging info is incomplete. The debugger
cannot guess that the "1-byte integer" is a character, and thus
prints the array as an array rather than a string.
(Continue reading)

Dodji Seketeli | 1 Aug 09:42 2007

Re: GDB IRC channel on freenode

On Tue, 31 Jul 2007 14:15:58 -0300,
Thiago Jung Bauermann <bauerman <at> br.ibm.com> wrote :

[...]
> I think we could experiment with this idea for the GDB project as
> well, so I am creating a #gdb channel on irc.freenode.org. Feel free
> to join if you think this could work. :-)

Fantastic news :-) I join as well ;-).

Cheers,

--

-- 
Dodji Seketeli
http://www.seketeli.org/dodji

Daniel Jacobowitz | 1 Aug 13:20 2007

Re: gdb registers multiple definition of symbols : patch to fixthis

On Wed, Aug 01, 2007 at 04:44:58AM +0000, Kalpana Ramamurthy wrote:
> How do we verify the information generated by the compiler ? I wanted to see 
> all the definitions
> generated by the compiler for that symbol. How can I do that ? I couldn't 
> decipher anything
> with readelf and objdump.

Sorry, those are the tools you need to use.

--

-- 
Daniel Jacobowitz
CodeSourcery

Luis Machado | 1 Aug 17:18 2007
Picon

HW Watchpoint events and the inferior

Folks,

I've been investigating watchpoints on GDB and i have a question on how
GDB handles Hardware Watchpoint events and which TID it uses to grab
information about the stopped_data_address, considering a multithreaded
application.

The stopped_data_address functions seem to use the current
"inferior_ptid" variable to do a PTRACE request in order to get
information from the debug registers. The "inferior_ptid" holds ID's for
the task that was currently running when GDB stopped. 

Is it always true that, if we have a triggered hw watchpoint event, the
inferior_ptid represents the task that actually triggered it?

What if we did trigger a watchpoint but it was a different task (other
than the current inferior_ptid) that triggered it? Will GDB eventually
switch to the other task and confirm that we had a hw watchpoint
trigger?

It could also happen that two or more threads triggered a watchpoint.
Does GDB handle those events sequentially?

Just to make the scope clear, i'm trying to associate a specific hw
watchpoint event with the thread that actually triggered it. It believe
that would be useful information.

Regards,

--

-- 
(Continue reading)

Daniel Jacobowitz | 1 Aug 18:00 2007

Re: HW Watchpoint events and the inferior

On Wed, Aug 01, 2007 at 12:18:01PM -0300, Luis Machado wrote:
> Folks,
> 
> I've been investigating watchpoints on GDB and i have a question on how
> GDB handles Hardware Watchpoint events and which TID it uses to grab
> information about the stopped_data_address, considering a multithreaded
> application.

GDB does not contain support for watchpoints in multi-threaded
programs.  You can find several patches and discussions of this issue
in the list archives as recently as the end of June.

In reply to a message from you, in fact!

--

-- 
Daniel Jacobowitz
CodeSourcery


Gmane