From: Paul Blacquiere <blacq@slingshot.co.nz>
To: Daniel Jacobowitz <drow@false.org>
Cc: "gdb@sourceware.org" <gdb@sourceware.org>
Subject: Re: Howto single step from beginning
Date: Thu, 02 Feb 2006 04:45:00 -0000 [thread overview]
Message-ID: <20060202174500.8gcgws4wk04kwgs0@webmail.slingshot.co.nz> (raw)
In-Reply-To: <20060202025704.GA21125@nevyn.them.org>
> Check with "set debug target 1" before running to see
> what bytes it's inserting, then check your kernel sources (esp.
> arm/kernel/ptrace.c and arm/kernel/traps.c) to see which breakpoints
> it expects.
Ok, not sure how to interpret this:
------------------------------------
(gdb) run
Starting program: /home/blacq/src/bin/test
target_acknowledge_created_inferior (198)
.
.
.
child:target_xfer_partial (2, (null), 0x1fc248, 0x0, 0x8094, 4) = 4, bytes =
00 e0 a0 e3
child:target_xfer_partial (2, (null), 0x0, 0x18c436, 0x8094, 4) = 4, bytes =
fe de ff e7
target_insert_breakpoint (0x8094, xxx) = 0
------------------------------------
So the first xfer, I assume retrieved the command at 0x08094, which is as per
the objdump. the second xfer writes a 0x0e7ffdefe to 0x08094, which is an
undefined command.
Is my interpretation correct?
From ptrace.c I find a comment as follows:
---
/*
* New breakpoints - use an undefined instruction. The ARM architecture
* reference manual guarantees that the following instruction space
* will produce an undefined instruction exception on all CPUs:
*
* ARM: xxxx 0111 1111 xxxx xxxx xxxx 1111 xxxx
* Thumb: 1101 1110 xxxx xxxx
*/
#define BREAKINST_ARM 0xe7f001f0
#define BREAKINST_THUMB 0xde01
---
If my interpretation on the gdb trace is correct, then it seems gdb is writing
an undefined instruction to generate an exception, but not the correct "user
instruction" to catch the registered hook? But this part I am guessing.
Thanks
PaulB.
next prev parent reply other threads:[~2006-02-02 4:45 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-02 1:08 Paul Blacquiere
2006-02-02 1:26 ` Daniel Jacobowitz
2006-02-02 2:52 ` Paul Blacquiere
2006-02-02 2:57 ` Daniel Jacobowitz
2006-02-02 3:20 ` Paul Blacquiere
2006-02-02 4:45 ` Paul Blacquiere [this message]
2006-02-02 5:07 ` Daniel Jacobowitz
2006-02-02 5:29 ` Paul Blacquiere
2006-02-02 13:52 ` Daniel Jacobowitz
2006-02-03 0:09 ` Paul Blacquiere
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060202174500.8gcgws4wk04kwgs0@webmail.slingshot.co.nz \
--to=blacq@slingshot.co.nz \
--cc=drow@false.org \
--cc=gdb@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox