diff options
| author | Peter Wemm <peter@FreeBSD.org> | 2001-09-21 04:09:40 +0000 |
|---|---|---|
| committer | Peter Wemm <peter@FreeBSD.org> | 2001-09-21 04:09:40 +0000 |
| commit | 2c9fd636468d0ef05927035ada6941f6e79b73db (patch) | |
| tree | 16c64177e8d0d661538f08910bff20a05381d89d /gnu/usr.bin/binutils | |
| parent | 3a3d60c9da55f4b8f0b90e33bb4120d9936b0908 (diff) | |
Notes
Diffstat (limited to 'gnu/usr.bin/binutils')
| -rw-r--r-- | gnu/usr.bin/binutils/gdb/i386/kvm-fbsd.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/gnu/usr.bin/binutils/gdb/i386/kvm-fbsd.c b/gnu/usr.bin/binutils/gdb/i386/kvm-fbsd.c index a08254dc5149..8abe2307abbb 100644 --- a/gnu/usr.bin/binutils/gdb/i386/kvm-fbsd.c +++ b/gnu/usr.bin/binutils/gdb/i386/kvm-fbsd.c @@ -438,7 +438,25 @@ xfer_umem (memaddr, myaddr, len, write) return n; } -#define KERNOFF ((unsigned)KERNBASE) +static CORE_ADDR +ksym_kernbase() +{ + static CORE_ADDR kernbase; + struct minimal_symbol *sym; + + if (kernbase == 0) + { + sym = lookup_minimal_symbol ("kernbase", NULL, NULL); + if (sym == NULL) { + kernbase = KERNBASE; + } else { + kernbase = SYMBOL_VALUE_ADDRESS (sym); + } + } + return kernbase; +} + +#define KERNOFF (ksym_kernbase()) #define INKERNEL(x) ((x) >= KERNOFF) static CORE_ADDR sbr; |
