aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@gnu.org>2001-03-13 12:42:08 +0000
committerMark Kettenis <kettenis@gnu.org>2001-03-13 12:42:08 +0000
commit305d65cac68fda199b660a79d22fbc52f45c2e47 (patch)
tree4a6506f78dc1079e22737ce5a19eafb8aa273874
parent8c2bc6877d75f8cd9073f206fab29920f73d325c (diff)
downloadgdb-305d65cac68fda199b660a79d22fbc52f45c2e47.zip
gdb-305d65cac68fda199b660a79d22fbc52f45c2e47.tar.gz
gdb-305d65cac68fda199b660a79d22fbc52f45c2e47.tar.bz2
* i386-linux-tdep.c: Fix formatting and clarify comments.
(i386_linux_svr4_fetch_link_map_offsets): Use NULL instead of 0 where appropriate.
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/i386-linux-tdep.c29
2 files changed, 20 insertions, 15 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 974cc21..b1d646c 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,9 @@
+2001-03-13 Mark Kettenis <kettenis@gnu.org>
+
+ * i386-linux-tdep.c: Fix formatting and clarify comments.
+ (i386_linux_svr4_fetch_link_map_offsets): Use NULL instead of 0
+ where appropriate.
+
2001-03-12 Andrew Cagney <ac131313@redhat.com>
* gnu-nat.c: Include "gdb_assert.h" instead of <assert.h>.
diff --git a/gdb/i386-linux-tdep.c b/gdb/i386-linux-tdep.c
index ee6ad8f..a973ac9 100644
--- a/gdb/i386-linux-tdep.c
+++ b/gdb/i386-linux-tdep.c
@@ -28,7 +28,8 @@
#include "symtab.h"
#include "symfile.h"
#include "objfiles.h"
-#include "solib-svr4.h" /* for struct link_map_offsets */
+
+#include "solib-svr4.h" /* For struct link_map_offsets. */
/* Recognizing signal handler frames. */
@@ -375,31 +376,30 @@ i386_linux_skip_solib_resolver (CORE_ADDR pc)
return 0;
}
-/* Fetch (and possibly build) an appropriate link_map_offsets structure
- for native i386 linux targets using the struct offsets defined in
- link.h (but without actual reference to that file).
+/* Fetch (and possibly build) an appropriate link_map_offsets
+ structure for native Linux/x86 targets using the struct offsets
+ defined in link.h (but without actual reference to that file).
- This makes it possible to access i386-linux shared libraries from
- a gdb that was not built on an i386-linux host (for cross debugging).
- */
+ This makes it possible to access Linux/x86 shared libraries from a
+ GDB that was not built on an Linux/x86 host (for cross debugging). */
struct link_map_offsets *
i386_linux_svr4_fetch_link_map_offsets (void)
{
static struct link_map_offsets lmo;
- static struct link_map_offsets *lmp = 0;
+ static struct link_map_offsets *lmp = NULL;
- if (lmp == 0)
+ if (lmp == NULL)
{
lmp = &lmo;
- lmo.r_debug_size = 8; /* 20 not actual size but all we need */
-
+ lmo.r_debug_size = 8; /* The actual size is 20 bytes, but
+ this is all we need. */
lmo.r_map_offset = 4;
lmo.r_map_size = 4;
- lmo.link_map_size = 20; /* 552 not actual size but all we need */
-
+ lmo.link_map_size = 20; /* The actual size is 552 bytes, but
+ this is all we need. */
lmo.l_addr_offset = 0;
lmo.l_addr_size = 4;
@@ -413,6 +413,5 @@ i386_linux_svr4_fetch_link_map_offsets (void)
lmo.l_prev_size = 4;
}
- return lmp;
+ return lmp;
}
-