Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F135923656
D3465.id8156.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
945 B
Referenced Files
None
Subscribers
None
D3465.id8156.diff
View Options
Index: head/lib/libproc/proc_bkpt.c
===================================================================
--- head/lib/libproc/proc_bkpt.c
+++ head/lib/libproc/proc_bkpt.c
@@ -51,6 +51,7 @@
#elif defined(__amd64__) || defined(__i386__)
#define BREAKPOINT_INSTR 0xcc /* int 0x3 */
#define BREAKPOINT_INSTR_SZ 1
+#define BREAKPOINT_ADJUST_SZ BREAKPOINT_INSTR_SZ
#elif defined(__arm__)
#define BREAKPOINT_INSTR 0xe7ffffff /* bkpt */
#define BREAKPOINT_INSTR_SZ 4
@@ -195,11 +196,19 @@
/*
* Decrement pc so that we delete the breakpoint at the correct
* address, i.e. at the BREAKPOINT_INSTR address.
+ *
+ * This is only needed on some architectures where the pc value
+ * when reading registers points at the instruction after the
+ * breakpoint, e.g. x86.
*/
void
proc_bkptregadj(unsigned long *pc)
{
- *pc = *pc - BREAKPOINT_INSTR_SZ;
+
+ (void)pc;
+#ifdef BREAKPOINT_ADJUST_SZ
+ *pc = *pc - BREAKPOINT_ADJUST_SZ;
+#endif
}
/*
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 15, 5:05 AM (14 h, 20 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
25316548
Default Alt Text
D3465.id8156.diff (945 B)
Attached To
Mode
D3465: Fix libproc on architectures that don't need pc adjustment
Attached
Detach File
Event Timeline
Log In to Comment