Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F132437557
D39951.id121479.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
D39951.id121479.diff
View Options
Index: devel/gdb/files/kgdb/fbsd-kvm.c
===================================================================
--- devel/gdb/files/kgdb/fbsd-kvm.c
+++ devel/gdb/files/kgdb/fbsd-kvm.c
@@ -279,6 +279,7 @@
kvm_t *nkvm;
const char *kernel;
std::string filename;
+ int osreldate;
bool writeable;
if (ops == NULL || ops->supply_pcb == NULL || ops->cpu_pcb_addr == NULL)
@@ -340,6 +341,10 @@
}
#endif
+ kvm = nkvm;
+ vmcore = std::move(filename);
+ current_inferior()->push_target (&fbsd_kvm_ops);
+
/*
* Determine the first address in KVA. Newer kernels export
* VM_MAXUSER_ADDRESS and the first kernel address can be
@@ -353,11 +358,26 @@
kernstart = kgdb_lookup("kernbase");
}
+ try {
+ osreldate = parse_and_eval_long("osreldate");
+ } catch (const gdb_exception_error &e) {
+ error ("Failed to look up osreldate");
+ }
+
/*
- * Lookup symbols needed for stoppcbs[] handling, but don't
+ * Lookup symbols needed for stoppcbs handling, but don't
* fail if they aren't present.
*/
stoppcbs = kgdb_lookup("stoppcbs");
+ try {
+ if (osreldate > 1400088) {
+ stoppcbs = read_memory_typed_address(stoppcbs,
+ builtin_type(target_gdbarch())->builtin_data_ptr);
+ }
+ } catch (const gdb_exception_error &e) {
+ stoppcbs = 0;
+ }
+
try {
pcb_size = parse_and_eval_long("pcb_size");
} catch (const gdb_exception_error &e) {
@@ -379,10 +399,6 @@
}
}
- kvm = nkvm;
- vmcore = std::move(filename);
- current_inferior()->push_target (&fbsd_kvm_ops);
-
kgdb_dmesg();
inf = current_inferior();
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Oct 17, 10:53 PM (3 h, 45 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
23849394
Default Alt Text
D39951.id121479.diff (1 KB)
Attached To
Mode
D39951: kgdb: Handle stoppcbs compat
Attached
Detach File
Event Timeline
Log In to Comment