powerpc gdb and gdbserver
I'm about to go and grab gdb to build a host-based debugger and target-based (PPC 405GP) gdbserver. Anybody out there with advice on how to do this? Should it just work out of the box or is there stuff I need to do to gdbserver for this platform? The sources I just found are gdb-6.0, and I'm using quite recent tools (gcc 3.3.2 glibc 2.3.2 binutils 2.14.90.0.5 - kudos to Dan Kegle for the crosstools stuff!!!).
Thanks!
--
Christopher R. Johnson
Principal Software Engineer
GCC Printers
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
Quoted 9 lines · Christopher R. Johnson
I'm about to go and grab gdb to build a host-based debugger and target-based (PPC 405GP) gdbserver. Anybody out there with advice on how to do this? Should it just work out of the box or is there stuff I need to do to gdbserver for this platform? The sources I just found are gdb-6.0, and I'm using quite recent tools (gcc 3.3.2 glibc 2.3.2 binutils 2.14.90.0.5 - kudos to Dan Kegle for the crosstools stuff!!!).
Thanks!
It should simply build and work. You build GDB by setting a --target and gdbserver by setting a --host. If you don't want to build a native GDB at the same time, run the --host build by gdbserver/configure instead of the top-level src/configure.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
Ok that worked pretty well, except that gdbserver wants a library called libthread_db.so on the target. From what little I can find this looks like something I should build from the glibc mess. Does anyone know what options I need to add to the glibc build in order to create this library?
Thanks!
Quoted 12 lines · Daniel Jacobowitz
Quoted 9 lines · Christopher R. Johnson
I'm about to go and grab gdb to build a host-based debugger and target-based (PPC 405GP) gdbserver. Anybody out there with advice on how to do this? Should it just work out of the box or is there stuff I need to do to gdbserver for this platform? The sources I just found are gdb-6.0, and I'm using quite recent tools (gcc 3.3.2 glibc 2.3.2 binutils 2.14.90.0.5 - kudos to Dan Kegle for the crosstools stuff!!!).
Thanks!
Quoted 10 lines
It should simply build and work. You build GDB by setting a --target and gdbserver by setting a --host. If you don't want to build a native GDB at the same time, run the --host build by gdbserver/configure instead of the top-level src/configure.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
--
Christopher R. Johnson
Principal Software Engineer
GCC Printers
(781)276-8763
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
Quoted 5 lines · Christopher R. Johnson
Ok that worked pretty well, except that gdbserver wants a library called libthread_db.so on the target. From what little I can find this looks like something I should build from the glibc mess. Does anyone know what options I need to add to the glibc build in order to create this library?
Just make a symlink to libthread_db.so.1.
Quoted 28 lines
Thanks!
Quoted 12 lines · Daniel Jacobowitz
Quoted 9 lines · Christopher R. Johnson
I'm about to go and grab gdb to build a host-based debugger and target-based (PPC 405GP) gdbserver. Anybody out there with advice on how to do this? Should it just work out of the box or is there stuff I need to do to gdbserver for this platform? The sources I just found are gdb-6.0, and I'm using quite recent tools (gcc 3.3.2 glibc 2.3.2 binutils 2.14.90.0.5 - kudos to Dan Kegle for the crosstools stuff!!!).
Thanks!
Quoted 10 lines
It should simply build and work. You build GDB by setting a --target and gdbserver by setting a --host. If you don't want to build a native GDB at the same time, run the --host build by gdbserver/configure instead of the top-level src/configure.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
Quoted 9 lines
--
Christopher R. Johnson
Principal Software Engineer
GCC Printers
(781)276-8763
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
As I mentioned, the library doesn't exist. I need to build it, but I'm not sure where it comes from (glibc I think) or how to get it built. Its a target library, so I have to build it for ppc and deliver it to my target box. That part I know how to do, its creating the library to begin with that I don't know how to do.
Quoted 46 lines · Daniel Jacobowitz
Quoted 6 lines · Christopher R. Johnson
Ok that worked pretty well, except that gdbserver wants a library called libthread_db.so on the target. From what little I can find this looks like something I should build from the glibc mess. Does anyone know what options I need to add to the glibc build in order to create this library?
Just make a symlink to libthread_db.so.1.
Quoted 34 lines
Thanks!
Quoted 11 lines · Daniel Jacobowitz
Quoted 9 lines · Christopher R. Johnson
I'm about to go and grab gdb to build a host-based debugger and target-based (PPC 405GP) gdbserver. Anybody out there with advice on how to do this? Should it just work out of the box or is there stuff I need to do to gdbserver for this platform? The sources I just found are gdb-6.0, and I'm using quite recent tools (gcc 3.3.2 glibc 2.3.2 binutils 2.14.90.0.5 - kudos to Dan Kegle for the crosstools stuff!!!).
Thanks!
Quoted 10 lines
It should simply build and work. You build GDB by setting a --target and gdbserver by setting a --host. If you don't want to build a native GDB at the same time, run the --host build by gdbserver/configure instead of the top-level src/configure.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer--
Christopher R. Johnson
Principal Software Engineer
GCC Printers
(781)276-8763
--
Christopher R. Johnson
Principal Software Engineer
GCC Printers
(781)276-8763
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
Quoted 3 lines · In message <[email protected]> you wrote:
As I mentioned, the library doesn't exist. I need to build it, but I'm not sure where it comes from (glibc I think) or how to get it built.
You can also just download the ELDK and use the ready-to-run tools (which include some extra fixes and extensions).
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: [email protected] Life would be so much easier if we could just look at the source
code. -- Dave Olson
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
Quoted 5 lines · Christopher R. Johnson
As I mentioned, the library doesn't exist. I need to build it, but I'm not sure where it comes from (glibc I think) or how to get it built. Its a target library, so I have to build it for ppc and deliver it to my target box. That part I know how to do, its creating the library to begin with that I don't know how to do.
Wherever you got glibc from you should have gotten libthread_db.so.1 also; maybe it just wasn't installed?
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
Good news. All I needed to do was setup Kegel's crosstool.sh by adding the following to my powerpc-405.dat file:
GLIBC_EXTRA_CONFIG="--without-fp"
to
GLIBC_EXTRA_CONFIG="--without-fp --enable-add-ons=linuxthreads_db"
And used crosstool to rebuild the tool chain. That resulted in the library gdbserver needed to run. I need some instruction from Dan on how to rebuild just a component, after this type of config change, so I don't go through the 2 hour crosstool run.
Quoted 9 lines · Daniel Jacobowitz
Quoted 6 lines · Christopher R. Johnson
As I mentioned, the library doesn't exist. I need to build it, but I'm not sure where it comes from (glibc I think) or how to get it built. Its a target library, so I have to build it for ppc and deliver it to my target box. That part I know how to do, its creating the library to begin with that I don't know how to do.
Quoted 3 lines
Wherever you got glibc from you should have gotten libthread_db.so.1 also; maybe it just wasn't installed?
--
Christopher R. Johnson
Principal Software Engineer
GCC Printers
(781)276-8763
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
Quoted 9 lines · Daniel Jacobowitz
Quoted 8 lines · Christopher R. Johnson
I'm about to go and grab gdb to build a host-based debugger and target-based (PPC 405GP) gdbserver. Anybody out there with advice on how to do this? Should it just work out of the box or is there stuff I need to do to gdbserver for this platform? The sources I just found are gdb-6.0, and I'm using quite recent tools (gcc 3.3.2 glibc 2.3.2 binutils 2.14.90.0.5 - kudos to Dan Kegle for the crosstools stuff!!!).
Quoted 6 lines
Quoted 1 line
Thanks!
It should simply build and work. You build GDB by setting a --target and gdbserver by setting a --host. If you don't want to build a native GDB at the same time, run the --host build by gdbserver/configure instead of the top-level src/configure.
Yes, I can confirm that. I just tried single and multi threaded debugging with gdb 6.0 release on a PPC405 target. I used a cross gdb with gdbserver and a native gdb. Only the native gdb (ie. the one running on the target) had problems with threads. Any idea about that?
Also, the official GDB site at http://www.gnu.org/software/gdb tells about some known issues with the 6.0 release. One is that the PPC targets had not yet implemented "the new frame format". I'm a little bit puzzled about that. Does anyone know what this is about?
I'm using gcc 2.95.3 and glibc 2.2.5 at the moment.
Regards,
Marius
--
Marius Groeger <[email protected]>
Project Manager
SYSGO Real-Time Solutions AG | Embedded and Real-Time Software Am Pfaffenstein 14
55270 Klein-Winternheim, Germany
Voice: +49-6136-9948-0 | FAX: +49-6136-9948-10
www.sysgo.com | www.elinos.com | www.osek.de
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
Quoted 4 lines · Marius Groeger
Also, the official GDB site at http://www.gnu.org/software/gdb tells about some known issues with the 6.0 release. One is that the PPC targets had not yet implemented "the new frame format". I'm a little bit puzzled about that. Does anyone know what this is about?
It's not a big deal. It's an internal GDB architecture change that would improve the reliability of backtraces, and other related features.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/