All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] remote debug u-boot through serial port
@ 2016-08-23 15:57 Ding, ChiX
  0 siblings, 0 replies; 2+ messages in thread
From: Ding, ChiX @ 2016-08-23 15:57 UTC (permalink / raw)
  To: u-boot

My target board is based on i386 architecture.
After I enable CONFIG_CMD_KGDB in the board config file, during building  it reports link error :
undefined reference to `kgdb_longjmp'

I checked the directory, only found the function definition for powerpc, but no definition for x86
arch/powerpc/lib/kgdb.c:kgdb_longjmp(long *buf, int val)

Does it mean that if I want to enable debugging u-boot through serial port on x86 , then I need to
copy/port the implementation of kgdb.c to u-boot, enable it and build it?

Thanks,
Chi


From: Ding, ChiX
Sent: Tuesday, August 23, 2016 3:25 PM
To: 'u-boot at lists.denx.de' <u-boot@lists.denx.de>
Subject: remote debug u-boot through serial port

Hi there
I'm learning how to remote debug u-boot through serial port.
In menuconfig general setup, I selected "enable debug information for tools".
It adds -g in gcc flag. After built is over, I got u-boot, u-boot.sym, u-boot.map and a few other files.
When I run objdump -trS u-boot, it does show the source code and the symbols.

However in gdb, when I tried to load the ELF executable file,  I got this error
(gdb) file u-boot
Reading symbols from u-boot...BFD: /root/work/cid_iafw_opensource-coreboot/payloads/external/U-Boot/u-boot/u-boot: attempt to load strings from a non-string section (number 0)
BFD: /root/work/cid_iafw_opensource-coreboot/payloads/external/U-Boot/u-boot/u-boot: attempt to load strings from a non-string section (number 0)

Anything I missed and caused this issue?
Also I wonder if I want to enable remote debugging of u-boot through serial port, what shall I do in the configuration?
I didn't see such option in menuconfig.  Is it enabled by default or shall I enable CONFIG_CMD_KGDB in my board config file ?

Thanks,
Chi


--------------------------------------------------------------
Intel Research and Development Ireland Limited
Registered in Ireland
Registered Office: Collinstown Industrial Park, Leixlip, County Kildare
Registered Number: 308263


This e-mail and any attachments may contain confidential material for the sole
use of the intended recipient(s). Any review or distribution by others is
strictly prohibited. If you are not the intended recipient, please contact the
sender and delete all copies.

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

* [U-Boot] remote debug u-boot through serial port
@ 2016-08-23 14:24 Ding, ChiX
  0 siblings, 0 replies; 2+ messages in thread
From: Ding, ChiX @ 2016-08-23 14:24 UTC (permalink / raw)
  To: u-boot

Hi there
I'm learning how to remote debug u-boot through serial port.
In menuconfig general setup, I selected "enable debug information for tools".
It adds -g in gcc flag. After built is over, I got u-boot, u-boot.sym, u-boot.map and a few other files.
When I run objdump -trS u-boot, it does show the source code and the symbols.

However in gdb, when I tried to load the ELF executable file,  I got this error
(gdb) file u-boot
Reading symbols from u-boot...BFD: /root/work/cid_iafw_opensource-coreboot/payloads/external/U-Boot/u-boot/u-boot: attempt to load strings from a non-string section (number 0)
BFD: /root/work/cid_iafw_opensource-coreboot/payloads/external/U-Boot/u-boot/u-boot: attempt to load strings from a non-string section (number 0)

Anything I missed and caused this issue?
Also I wonder if I want to enable remote debugging of u-boot through serial port, what shall I do in the configuration?
I didn't see such option in menuconfig.  Is it enabled by default or shall I enable CONFIG_CMD_KGDB in my board config file ?

Thanks,
Chi


--------------------------------------------------------------
Intel Research and Development Ireland Limited
Registered in Ireland
Registered Office: Collinstown Industrial Park, Leixlip, County Kildare
Registered Number: 308263


This e-mail and any attachments may contain confidential material for the sole
use of the intended recipient(s). Any review or distribution by others is
strictly prohibited. If you are not the intended recipient, please contact the
sender and delete all copies.

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

end of thread, other threads:[~2016-08-23 15:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-23 15:57 [U-Boot] remote debug u-boot through serial port Ding, ChiX
  -- strict thread matches above, loose matches on Subject: below --
2016-08-23 14:24 Ding, ChiX

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.