Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F132882362
D4036.id10575.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D4036.id10575.diff
View Options
Index: head/sys/ddb/db_run.c
===================================================================
--- head/sys/ddb/db_run.c
+++ head/sys/ddb/db_run.c
@@ -65,16 +65,28 @@
int db_load_count;
int db_store_count;
+#ifdef SOFTWARE_SSTEP
+db_breakpoint_t db_not_taken_bkpt = 0;
+db_breakpoint_t db_taken_bkpt = 0;
+#endif
+
#ifndef db_set_single_step
void db_set_single_step(void);
#endif
#ifndef db_clear_single_step
void db_clear_single_step(void);
#endif
-
+#ifndef db_pc_is_singlestep
+static bool
+db_pc_is_singlestep(db_addr_t pc)
+{
#ifdef SOFTWARE_SSTEP
-db_breakpoint_t db_not_taken_bkpt = 0;
-db_breakpoint_t db_taken_bkpt = 0;
+ if ((db_not_taken_bkpt != 0 && pc == db_not_taken_bkpt->address)
+ || (db_taken_bkpt != 0 && pc == db_taken_bkpt->address))
+ return (true);
+#endif
+ return (false);
+}
#endif
bool
@@ -84,11 +96,9 @@
db_breakpoint_t bkpt;
pc = PC_REGS();
-#ifdef SOFTWARE_SSTEP
- if ((db_not_taken_bkpt != 0 && pc == db_not_taken_bkpt->address)
- || (db_taken_bkpt != 0 && pc == db_taken_bkpt->address))
+
+ if (db_pc_is_singlestep(pc))
*is_breakpoint = false;
-#endif
db_clear_single_step();
db_clear_breakpoints();
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Oct 21, 7:53 PM (2 h, 55 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
23955259
Default Alt Text
D4036.id10575.diff (1 KB)
Attached To
Mode
D4036: Add helper to catch single step debug event and distinguish it from bkpt
Attached
Detach File
Event Timeline
Log In to Comment