* special symbol file address -1: debug lin-kern mods
@ 2000-03-14 0:17 Amit S. Kale
2000-04-01 0:00 ` Amit S. Kale
0 siblings, 1 reply; 2+ messages in thread
From: Amit S. Kale @ 2000-03-14 0:17 UTC (permalink / raw)
To: gdb
Hi,
I have been trying to get gdb working at loading linux kernel modules via
'add-symbol-file'. Since it doesn't work properly with gdb, I tried to patch
gdb but in vein ( 'regression caused by elfread.c patch' thread ).
I had patched gdb 4.18 before I started using current gdb. The patch disabled
relocations if symbol file load address was -1.
e.g. add-symbol-file foo.reloc -1
loads foo.reloc without relocating. Where foo.reloc is built from linux kernel
module foo using ld.
ld -o foo.reloc -Ttext< module text address> -Tdata<module data address>
-Tbss<module bss address> -R vmlinux -noinhibit-exec foo
How about adding this feature in gdb?
Thanks.
--
Amit Kale
Veritas Software ( http://www.veritas.com )
P.S. Above mentions patch for gdb-4.18 was as follows
diff -Naur gdb-4.18/gdb/symfile.c gdb/gdb/symfile.c
--- gdb-4.18/gdb/symfile.c Thu Feb 11 05:54:38 1999
+++ gdb/gdb/symfile.c Mon Dec 27 16:15:56 1999
@@ -525,7 +525,7 @@
and assume that <addr> is where that got loaded. Due to historical
precedent, we warn if that doesn't happen to be a text segment. */
- if (mainline)
+ if (mainline || addr == -1)
{
addr = 0; /* No offset from objfile addresses. */
}
^ permalink raw reply [flat|nested] 2+ messages in thread
* special symbol file address -1: debug lin-kern mods
2000-03-14 0:17 special symbol file address -1: debug lin-kern mods Amit S. Kale
@ 2000-04-01 0:00 ` Amit S. Kale
0 siblings, 0 replies; 2+ messages in thread
From: Amit S. Kale @ 2000-04-01 0:00 UTC (permalink / raw)
To: gdb
Hi,
I have been trying to get gdb working at loading linux kernel modules via
'add-symbol-file'. Since it doesn't work properly with gdb, I tried to patch
gdb but in vein ( 'regression caused by elfread.c patch' thread ).
I had patched gdb 4.18 before I started using current gdb. The patch disabled
relocations if symbol file load address was -1.
e.g. add-symbol-file foo.reloc -1
loads foo.reloc without relocating. Where foo.reloc is built from linux kernel
module foo using ld.
ld -o foo.reloc -Ttext< module text address> -Tdata<module data address>
-Tbss<module bss address> -R vmlinux -noinhibit-exec foo
How about adding this feature in gdb?
Thanks.
--
Amit Kale
Veritas Software ( http://www.veritas.com )
P.S. Above mentions patch for gdb-4.18 was as follows
diff -Naur gdb-4.18/gdb/symfile.c gdb/gdb/symfile.c
--- gdb-4.18/gdb/symfile.c Thu Feb 11 05:54:38 1999
+++ gdb/gdb/symfile.c Mon Dec 27 16:15:56 1999
@@ -525,7 +525,7 @@
and assume that <addr> is where that got loaded. Due to historical
precedent, we warn if that doesn't happen to be a text segment. */
- if (mainline)
+ if (mainline || addr == -1)
{
addr = 0; /* No offset from objfile addresses. */
}
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2000-04-01 0:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-03-14 0:17 special symbol file address -1: debug lin-kern mods Amit S. Kale
2000-04-01 0:00 ` Amit S. Kale
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).