* [Linux-ia64] Debugging early ode under the simulator
@ 2002-11-14 4:41 Peter Chubb
2002-11-14 4:51 ` David Mosberger
0 siblings, 1 reply; 2+ messages in thread
From: Peter Chubb @ 2002-11-14 4:41 UTC (permalink / raw)
To: linux-ia64
Hi,
There's no easy way to set breakpoints or watchpoints in the
kernel before the kernel starts running, when running under the SKI
simulator.
One way to fix this is appended.
# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
# ChangeSet 1.814 -> 1.815
# arch/ia64/boot/bootloader.c 1.3 -> 1.4
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 02/11/14 peterc@gelato.unsw.edu.au 1.815
# Add a debug breakpoint dummy function.
#
# When in the simulator, one cannot set a break point or watchpoint
# before the symbol table for the kernel is in memory,
# and the kernel has set things up to run in a virtual addrs space.
#
# Therefore, insert a dummy function here that one can set a breakpoint
# on, then single step a few dozen times, then set up the
# breakpoints one really wants.
# --------------------------------------------
#
diff -Nru a/arch/ia64/boot/bootloader.c b/arch/ia64/boot/bootloader.c
--- a/arch/ia64/boot/bootloader.c Thu Nov 14 15:36:29 2002
+++ b/arch/ia64/boot/bootloader.c Thu Nov 14 15:36:29 2002
@@ -53,6 +53,14 @@
#include "../kernel/fw-emu.c"
+/*
+ * Set a break point on this function so that
+ * symbols are available to set breakpoints in the
+ * kernel being debugged.
+ */
+void debug_break(void) {
+}
+
static void
cons_write (const char *buf)
{
@@ -187,6 +195,7 @@
ssc(0, (long) kpath, 0, 0, SSC_LOAD_SYMBOLS);
+ debug_break();
asm volatile ("mov sp=%2; mov r28=%1; br.sptk.few %0"
:: "b"(e_entry), "r"(bp), "r"(__pa(&stack)));
--
Dr Peter Chubb peterc@gelato.unsw.edu.au
You are lost in a maze of BitKeeper repositories, all almost the same.
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [Linux-ia64] Debugging early ode under the simulator
2002-11-14 4:41 [Linux-ia64] Debugging early ode under the simulator Peter Chubb
@ 2002-11-14 4:51 ` David Mosberger
0 siblings, 0 replies; 2+ messages in thread
From: David Mosberger @ 2002-11-14 4:51 UTC (permalink / raw)
To: linux-ia64
>>>>> On Thu, 14 Nov 2002 15:41:38 +1100, Peter Chubb <peter@chubb.wattle.id.au> said:
Peter> Hi, There's no easy way to set breakpoints or watchpoints in
Peter> the kernel before the kernel starts running, when running
Peter> under the SKI simulator.
Peter> One way to fix this is appended.
I usually would just look for the indirect branch in _start(), but
that's admittedly not the most obvious way to go about it. Your
solution is easier for new users, so I applied a (slightly modified)
version of it.
Thanks,
--david
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-11-14 4:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-11-14 4:41 [Linux-ia64] Debugging early ode under the simulator Peter Chubb
2002-11-14 4:51 ` David Mosberger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox