* [commit] mn10300-linux: Add shared library support
@ 2005-09-06 23:18 Kevin Buettner
2005-09-07 0:06 ` Daniel Jacobowitz
2005-09-10 13:04 ` Mark Kettenis
0 siblings, 2 replies; 5+ messages in thread
From: Kevin Buettner @ 2005-09-06 23:18 UTC (permalink / raw)
To: gdb-patches
I've just committed the patch below.
* mn10300-linux-tdep.c (solib-svr4.h): Include.
(mn10300_linux_svr4_fetch_link_map_offsets): New function.
(am33_linux_init_osabi): Register it.
* Makefile.in (mn10300-linux-tdep.o): Update dependencies.
Index: Makefile.in
===================================================================
RCS file: /cvs/src/src/gdb/Makefile.in,v
retrieving revision 1.751
diff -u -p -r1.751 Makefile.in
--- Makefile.in 3 Sep 2005 00:35:45 -0000 1.751
+++ Makefile.in 6 Sep 2005 23:09:56 -0000
@@ -2306,7 +2306,8 @@ mips-tdep.o: mips-tdep.c $(defs_h) $(gdb
mipsv4-nat.o: mipsv4-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) $(target_h) \
$(regcache_h) $(gregset_h)
mn10300-linux-tdep.o: mn10300-linux-tdep.c $(defs_h) $(gdbcore_h) \
- $(gdb_string_h) $(regcache_h) $(mn10300_tdep_h)
+ $(gdb_string_h) $(regcache_h) $(mn10300_tdep_h) $(gdb_assert_h) \
+ $(bfd_h) $(elf_bfd_h) $(osabi_h) $(regset_h) $(solib_svr4_h)
mn10300-tdep.o: mn10300-tdep.c $(defs_h) $(arch_utils_h) $(dis_asm_h) \
$(gdbtypes_h) $(regcache_h) $(gdb_string_h) $(gdb_assert_h) \
$(frame_h) $(frame_unwind_h) $(frame_base_h) $(trad_frame_h) \
Index: mn10300-linux-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/mn10300-linux-tdep.c,v
retrieving revision 1.1
diff -u -p -r1.1 mn10300-linux-tdep.c
--- mn10300-linux-tdep.c 2 Sep 2005 22:53:33 -0000 1.1
+++ mn10300-linux-tdep.c 6 Sep 2005 23:09:56 -0000
@@ -29,6 +29,7 @@
#include "elf-bfd.h"
#include "osabi.h"
#include "regset.h"
+#include "solib-svr4.h"
#include <stdlib.h>
@@ -467,6 +468,49 @@ am33_regset_from_core_section (struct gd
am33_collect_gregset_method);
}
+/* Fetch, and possibly build, an appropriate link_map_offsets structure
+ for mn10300 linux targets using the struct offsets defined in <link.h>.
+ Note, however, that link.h is not actually referred to in this file.
+ Instead, the relevant structs offsets were obtained from examining
+ link.h. (We can't refer to link.h from this file because the host
+ system won't necessarily have it, or if it does, the structs which
+ it defines will refer to the host system, not the target.) */
+
+struct link_map_offsets *
+mn10300_linux_svr4_fetch_link_map_offsets (void)
+{
+ static struct link_map_offsets lmo;
+ static struct link_map_offsets *lmp = 0;
+
+ if (lmp == 0)
+ {
+ lmp = &lmo;
+
+ lmo.r_debug_size = 8; /* Actual size is 20, but this is all we
+ need. */
+
+ lmo.r_map_offset = 4;
+ lmo.r_map_size = 4;
+
+ lmo.link_map_size = 20; /* Might be larger, but this is all we
+ need. */
+
+ lmo.l_addr_offset = 0;
+ lmo.l_addr_size = 4;
+
+ lmo.l_name_offset = 4;
+ lmo.l_name_size = 4;
+
+ lmo.l_next_offset = 12;
+ lmo.l_next_size = 4;
+
+ lmo.l_prev_offset = 16;
+ lmo.l_prev_size = 4;
+ }
+
+ return lmp;
+}
+
/* AM33 Linux osabi has been recognized.
Now's our chance to register our corefile handling. */
@@ -475,6 +519,8 @@ am33_linux_init_osabi (struct gdbarch_in
{
set_gdbarch_regset_from_core_section (gdbarch,
am33_regset_from_core_section);
+ set_solib_svr4_fetch_link_map_offsets
+ (gdbarch, mn10300_linux_svr4_fetch_link_map_offsets);
}
void
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [commit] mn10300-linux: Add shared library support
2005-09-06 23:18 [commit] mn10300-linux: Add shared library support Kevin Buettner
@ 2005-09-07 0:06 ` Daniel Jacobowitz
2005-09-07 0:29 ` Kevin Buettner
2005-09-10 13:04 ` Mark Kettenis
1 sibling, 1 reply; 5+ messages in thread
From: Daniel Jacobowitz @ 2005-09-07 0:06 UTC (permalink / raw)
To: Kevin Buettner; +Cc: gdb-patches
On Tue, Sep 06, 2005 at 04:17:57PM -0700, Kevin Buettner wrote:
> I've just committed the patch below.
>
> * mn10300-linux-tdep.c (solib-svr4.h): Include.
> (mn10300_linux_svr4_fetch_link_map_offsets): New function.
> (am33_linux_init_osabi): Register it.
> * Makefile.in (mn10300-linux-tdep.o): Update dependencies.
May I recommend svr4_ilp32_fetch_link_map_offsets instead?
--
Daniel Jacobowitz
CodeSourcery, LLC
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [commit] mn10300-linux: Add shared library support
2005-09-07 0:06 ` Daniel Jacobowitz
@ 2005-09-07 0:29 ` Kevin Buettner
0 siblings, 0 replies; 5+ messages in thread
From: Kevin Buettner @ 2005-09-07 0:29 UTC (permalink / raw)
To: gdb-patches
On Tue, 6 Sep 2005 20:06:13 -0400
Daniel Jacobowitz <drow@false.org> wrote:
> May I recommend svr4_ilp32_fetch_link_map_offsets instead?
Yes, thanks! I've just committed the following change:
* mn10300-linux-tdep.c (mn10300_linux_svr4_fetch_link_map_offsets):
Delete.
(am33_linux_init_osabi): Register svr4_ilp32_fetch_link_map_offsets
instead.
Index: mn10300-linux-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/mn10300-linux-tdep.c,v
retrieving revision 1.2
diff -u -p -r1.2 mn10300-linux-tdep.c
--- mn10300-linux-tdep.c 6 Sep 2005 23:14:44 -0000 1.2
+++ mn10300-linux-tdep.c 7 Sep 2005 00:22:03 -0000
@@ -468,49 +468,6 @@ am33_regset_from_core_section (struct gd
am33_collect_gregset_method);
}
-/* Fetch, and possibly build, an appropriate link_map_offsets structure
- for mn10300 linux targets using the struct offsets defined in <link.h>.
- Note, however, that link.h is not actually referred to in this file.
- Instead, the relevant structs offsets were obtained from examining
- link.h. (We can't refer to link.h from this file because the host
- system won't necessarily have it, or if it does, the structs which
- it defines will refer to the host system, not the target.) */
-
-struct link_map_offsets *
-mn10300_linux_svr4_fetch_link_map_offsets (void)
-{
- static struct link_map_offsets lmo;
- static struct link_map_offsets *lmp = 0;
-
- if (lmp == 0)
- {
- lmp = &lmo;
-
- lmo.r_debug_size = 8; /* Actual size is 20, but this is all we
- need. */
-
- lmo.r_map_offset = 4;
- lmo.r_map_size = 4;
-
- lmo.link_map_size = 20; /* Might be larger, but this is all we
- need. */
-
- lmo.l_addr_offset = 0;
- lmo.l_addr_size = 4;
-
- lmo.l_name_offset = 4;
- lmo.l_name_size = 4;
-
- lmo.l_next_offset = 12;
- lmo.l_next_size = 4;
-
- lmo.l_prev_offset = 16;
- lmo.l_prev_size = 4;
- }
-
- return lmp;
-}
-
/* AM33 Linux osabi has been recognized.
Now's our chance to register our corefile handling. */
@@ -520,7 +477,7 @@ am33_linux_init_osabi (struct gdbarch_in
set_gdbarch_regset_from_core_section (gdbarch,
am33_regset_from_core_section);
set_solib_svr4_fetch_link_map_offsets
- (gdbarch, mn10300_linux_svr4_fetch_link_map_offsets);
+ (gdbarch, svr4_ilp32_fetch_link_map_offsets);
}
void
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [commit] mn10300-linux: Add shared library support
2005-09-06 23:18 [commit] mn10300-linux: Add shared library support Kevin Buettner
2005-09-07 0:06 ` Daniel Jacobowitz
@ 2005-09-10 13:04 ` Mark Kettenis
2005-09-12 2:29 ` Kevin Buettner
1 sibling, 1 reply; 5+ messages in thread
From: Mark Kettenis @ 2005-09-10 13:04 UTC (permalink / raw)
To: kevinb; +Cc: gdb-patches
> Date: Tue, 6 Sep 2005 16:17:57 -0700
> From: Kevin Buettner <kevinb@redhat.com>
>
> I've just committed the patch below.
>
> * mn10300-linux-tdep.c (solib-svr4.h): Include.
> (mn10300_linux_svr4_fetch_link_map_offsets): New function.
> (am33_linux_init_osabi): Register it.
> * Makefile.in (mn10300-linux-tdep.o): Update dependencies.
Kevin, can you just use svr4_ilp32_fetch_link_map_offsets() instead?
Mark
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [commit] mn10300-linux: Add shared library support
2005-09-10 13:04 ` Mark Kettenis
@ 2005-09-12 2:29 ` Kevin Buettner
0 siblings, 0 replies; 5+ messages in thread
From: Kevin Buettner @ 2005-09-12 2:29 UTC (permalink / raw)
To: gdb-patches
On Sat, 10 Sep 2005 15:04:17 +0200 (CEST)
Mark Kettenis <mark.kettenis@xs4all.nl> wrote:
> > Date: Tue, 6 Sep 2005 16:17:57 -0700
> > From: Kevin Buettner <kevinb@redhat.com>
> >
> > I've just committed the patch below.
> >
> > * mn10300-linux-tdep.c (solib-svr4.h): Include.
> > (mn10300_linux_svr4_fetch_link_map_offsets): New function.
> > (am33_linux_init_osabi): Register it.
> > * Makefile.in (mn10300-linux-tdep.o): Update dependencies.
>
> Kevin, can you just use svr4_ilp32_fetch_link_map_offsets() instead?
Yes. Daniel mentioned that too and that's what I ended up doing.
Kevin
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2005-09-12 2:29 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-09-06 23:18 [commit] mn10300-linux: Add shared library support Kevin Buettner
2005-09-07 0:06 ` Daniel Jacobowitz
2005-09-07 0:29 ` Kevin Buettner
2005-09-10 13:04 ` Mark Kettenis
2005-09-12 2:29 ` Kevin Buettner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox