This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[patch/gdbserver] Add a debugging output to linux-arm-low.c
- From: Daniel Jacobowitz <drow at false dot org>
- To: gdb-patches at sources dot redhat dot com
- Date: Sat, 28 Feb 2004 13:00:52 -0500
- Subject: [patch/gdbserver] Add a debugging output to linux-arm-low.c
There's a corresponding fprintf in linux-i386-low.c, which I've always found
helpful when trying to trace gdbserver behavior.
Will commit in a little while.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
2004-02-28 Daniel Jacobowitz <drow@mvista.com>
* linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
Index: gdb/gdbserver/linux-arm-low.c
===================================================================
RCS file: /big/fsf/rsync/src-cvs/src/gdb/gdbserver/linux-arm-low.c,v
retrieving revision 1.6
diff -u -p -r1.6 linux-arm-low.c
--- gdb/gdbserver/linux-arm-low.c 24 Jul 2003 19:03:50 -0000 1.6
+++ gdb/gdbserver/linux-arm-low.c 28 Feb 2004 17:59:30 -0000
@@ -1,5 +1,5 @@
/* GNU/Linux/ARM specific low level interface, for the remote server for GDB.
- Copyright 1995, 1996, 1998, 1999, 2000, 2001, 2002
+ Copyright 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
This file is part of GDB.
@@ -47,11 +47,15 @@ arm_cannot_fetch_register (int regno)
return (regno >= arm_num_regs);
}
+extern int debug_threads;
+
static CORE_ADDR
arm_get_pc ()
{
unsigned long pc;
collect_register_by_name ("pc", &pc);
+ if (debug_threads)
+ fprintf (stderr, "stop pc is %08lx\n", pc);
return pc;
}