[coreboot] Patch set updated for coreboot: e251653 Add an option for Waiting for gdb connection if the gdb stub configuration is chosen.

Denis Carikli (GNUtoo@no-log.org) gerrit at coreboot.org
Sat Jun 23 02:22:05 CEST 2012

Denis Carikli (GNUtoo at no-log.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/1134


commit e251653bf5f5d807218f1822ba950161648e0e34
Author: Denis 'GNUtoo' Carikli <GNUtoo at no-log.org>
Date:   Fri Jun 22 15:56:37 2012 +0200

    Add an option for Waiting for gdb connection if the gdb stub configuration is chosen.
    Here's a quick demonstration on how to use it(tested on M4A785T-M).
      (gdb) file ./build/cbfs/fallback/coreboot_ram.debug
      Reading symbols from [...]/build/cbfs/fallback/coreboot_ram.debug...done.
      (gdb) set remotebaud 115200
      (gdb) target remote /dev/ttyUSB0
      Remote debugging using /dev/ttyUSB0
      _text () at src/arch/x86/lib/c_start.S:85
      85		call	hardwaremain
    Change-Id: Ia49cbecc41deb061433bc39f5b81715da49edc98
    Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo at no-log.org>
 src/Kconfig                |    7 +++++++
 src/arch/x86/lib/c_start.S |    5 ++++-
 2 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/src/Kconfig b/src/Kconfig
index 717146d..3453614 100644
--- a/src/Kconfig
+++ b/src/Kconfig
@@ -779,6 +779,13 @@ config GDB_STUB
 	  If enabled, you will be able to set breakpoints for gdb debugging.
 	  See src/arch/x86/lib/c_start.S for details.
+config GDB_WAIT
+	bool "Wait for a GDB connection"
+	default n
+	depends on GDB_STUB
+	help
+	  If enabled, coreboot will wait for a GDB connection.
 config DEBUG_CBFS
 	bool "Output verbose CBFS debug messages"
 	default n
diff --git a/src/arch/x86/lib/c_start.S b/src/arch/x86/lib/c_start.S
index 005ac33..fd9dce7 100644
--- a/src/arch/x86/lib/c_start.S
+++ b/src/arch/x86/lib/c_start.S
@@ -78,6 +78,9 @@ _start:
 	/* Restore the stack location */
 	movl	%ebp, %esp
+	call gdb_stub_breakpoint
 	/* The boot_complete flag has already been pushed */
 	call	hardwaremain
@@ -228,7 +231,7 @@ int_hand:
 	.globl gdb_stub_breakpoint

More information about the coreboot mailing list