linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Compile gdbserver for powerpc
@ 2000-06-20 14:59 interface.etd1
  0 siblings, 0 replies; 4+ messages in thread
From: interface.etd1 @ 2000-06-20 14:59 UTC (permalink / raw)
  To: linuxppc-embedded


Hi,

I want to debug on an embedded powerpc board from my intel pc.

I don't know if I must use gdbserver or simply gdb on target to debug via
DDD.
I have no ppcbug on my board.

How can I compile gdb with host and target set to powerpc on my intel board
?

When I want to compile gdbserser 4.18 on my pc, gdbserver directory is not
created and no executable is generated !!!

Thanks for your help.

G. Guével

INTERFACE CONCEPT
ZI N°2 des Pays Bas 29510 Briec de l'Odet
FRANCE
(33)02.98.57.30.30
interface.etd1@wanadoo.fr


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: Compile gdbserver for powerpc
@ 2000-06-20 15:35 ` Lucinda Schafer
  2000-06-21  1:49   ` Murray Jensen
  0 siblings, 1 reply; 4+ messages in thread
From: Lucinda Schafer @ 2000-06-20 15:35 UTC (permalink / raw)
  To: interface.etd1, linuxppc-embedded


>From Graham Stoney's "Linux for PowerPC Embedded Systems HOWTO/FAQ", Section
18.2:

18.2 GDB
Once the kernel is running, you can use gdb in several ways:

native
If you have lots of RAM, you can run it directly on your target. If you are
cross developing, you need to configure gdb with:
% configure --host=powerpc-linux

gdbserver
You can run gdbserver on your target and run gdb back on your development
machine, even if you're cross developing. This requires far less resources
than running all of gdb on your target. See the thread at :
http://lists.linuxppc.org/listarcs/linuxppc-embedded/200001/msg00156.html.
(I did not see anything here about GDB--les)

Get gdbserver, and see the enclosed README at:
ftp://ftp.ppc.kernel.org/pub/linuxppc/embedded/gdbserver.tgz (I could not
connect to this--les)
If you're cross-developing, remember to configure your gdb as described
earlier.

.
.
.
18.3 Kernel
It is not currently possible to use gdb for kenel debugging.
.
.
.
Hope this points you in the right direction.

Lucinda Schafer
Staff Software Engineer
Adaptive Micro-Ware, Inc.



-----Original Message-----
From: interface.etd1 [mailto:interface.etd1@wanadOO.fr]
Sent: Tuesday, June 20, 2000 10:00 AM
To: linuxppc-embedded@lists.linuxppc.org
Subject: Compile gdbserver for powerpc



Hi,

I want to debug on an embedded powerpc board from my intel pc.

I don't know if I must use gdbserver or simply gdb on target to debug via
DDD.
I have no ppcbug on my board.

How can I compile gdb with host and target set to powerpc on my intel board
?

When I want to compile gdbserser 4.18 on my pc, gdbserver directory is not
created and no executable is generated !!!

Thanks for your help.

G. Guével

INTERFACE CONCEPT
ZI N°2 des Pays Bas 29510 Briec de l'Odet
FRANCE
(33)02.98.57.30.30
interface.etd1@wanadoo.fr


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Compile gdbserver for powerpc
  2000-06-20 15:35 ` Compile gdbserver for powerpc Lucinda Schafer
@ 2000-06-21  1:49   ` Murray Jensen
  2000-06-26  6:36     ` Graham Stoney
  0 siblings, 1 reply; 4+ messages in thread
From: Murray Jensen @ 2000-06-21  1:49 UTC (permalink / raw)
  To: linuxppc-embedded


On Tue, 20 Jun 2000 10:35:21 -0500, Lucinda Schafer <lucsch@adaptivemicro.com>
writes:
>>From Graham Stoney's "Linux for PowerPC Embedded Systems HOWTO/FAQ", Section
...
>18.3 Kernel
>It is not currently possible to use gdb for kenel debugging.

Whoops. This should probably change. I use gdb for kernel debugging on
the (8xx) 2.[34].x kernels (its *very* handy!). You need to enable
CONFIG_KGDB first though, and if you don't want to use the default serial
port (via SMC1?? for 8xx) you need to do a bit of hacking. Here's how:

1. make sure either CONFIG_SERIAL_CONSOLE, or CONFIG_KGDB, itself is undefined
   when 8xx_io/uart.c is compiled

2. ensure the call to kgdb_map_scc() is not done in arch/ppc/kernel/setup.c;
   replace it with a call to your own serial port init routine, if required.

3. write three functions (usually in your serial driver, and inside #ifdef
   CONFIG_SERIAL_CONSOLE, inside #ifdef CONFIG_KGDB):

	extern void putDebugChar(char kgdb_char);
	extern char getDebugChar(void);
	extern void kgdb_interruptible(int yes);

   the first two are fairly obvious - busy-wait put and get character to
   the chosen serial port. the third enables (yes==1) or disables (yes==0)
   *serial* interrupts (not all interrupts - at least I don't think so).

   e.g.	#ifdef CONFIG_SERIAL_CONSOLE
	... (serial console stuff) ...
	#ifdef CONFIG_KGDB
	void
	putDebugChar(char c)
	{
	...
	#endif /* CONFIG_KGDB */
	#endif /* CONFIG_SERIAL_CONSOLE */

1 and 2 are for the 8xx kernel - there will be similar steps for other
platforms (i.e. making sure the code for the default kgdb serial "driver" is
not compiled in, obviously so there is not a clash with the ones you write).

One thing to remember: if you enable CONFIG_KGDB, setup_arch() in
arch/ppc/kernel/setup.c will execute a breakpoint() and for the kernel
to proceed past that point, you must start gdb on your host in "remote"
mode (on the appropriate serial port with the appropriate speed) and
perform a gdb "continue" command (this caused me some concern when it
was added a few months ago, I thought my kernel was dead :-)

Hope this helps. Cheers!
								Murray...
--
Murray Jensen, CSIRO Manufacturing Sci & Tech,         Phone: +61 3 9662 7763
Locked Bag No. 9, Preston, Vic, 3072, Australia.         Fax: +61 3 9662 7853
Internet: Murray.Jensen@cmst.csiro.au  (old address was mjj@mlb.dmt.csiro.au)


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Compile gdbserver for powerpc
  2000-06-21  1:49   ` Murray Jensen
@ 2000-06-26  6:36     ` Graham Stoney
  0 siblings, 0 replies; 4+ messages in thread
From: Graham Stoney @ 2000-06-26  6:36 UTC (permalink / raw)
  To: Murray Jensen; +Cc: linuxppc-embedded


On Tue, 20 Jun 2000 10:35:21 -0500, Lucinda Schafer <lucsch@adaptivemicro.com>
writes:
>>From Graham Stoney's "Linux for PowerPC Embedded Systems HOWTO/FAQ", Section
...
>18.3 Kernel
>It is not currently possible to use gdb for kenel debugging.

Murray Jensen writes:
> Whoops. This should probably change.

It already had. Lucinda must be looking at an old copy of the HOWTO.

Regards,
Graham
--
Graham Stoney
Principal Hardware/Software Engineer
Canon Information Systems Research Australia
Ph: +61 2 9805 2909  Fax: +61 2 9805 2929

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2000-06-26  6:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <lucsch@adaptivemicro.com>
2000-06-20 15:35 ` Compile gdbserver for powerpc Lucinda Schafer
2000-06-21  1:49   ` Murray Jensen
2000-06-26  6:36     ` Graham Stoney
2000-06-20 14:59 interface.etd1

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 NNTP newsgroup(s).