/* Native support code for PPC AIX, for GDB the GNU debugger.
- Copyright (C) 2006-2013 Free Software Foundation, Inc.
+ Copyright (C) 2006-2014 Free Software Foundation, Inc.
Free Software Foundation, Inc.
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "defs.h"
-#include "gdb_string.h"
+#include <string.h>
#include "gdb_assert.h"
#include "osabi.h"
#include "regcache.h"
the following program on AIX 5.3. */
#if 0
- #include <stddef.h>
- #include <stdio.h>
- #define __LDINFO_PTRACE32__
- #define __LDINFO_PTRACE64__
- #include <sys/ldr.h>
-
- #define pinfo(type,member) \
- { \
- struct type ldi = {0}; \
- \
- printf (" {%d, %d},\t/* %s */\n", \
- offsetof (struct type, member), \
- sizeof (ldi.member), \
- #member); \
- } \
- while (0)
-
- int
- main (void)
- {
- printf ("static const struct ld_info_desc ld_info32_desc =\n{\n");
- pinfo (__ld_info32, ldinfo_next);
- pinfo (__ld_info32, ldinfo_fd);
- pinfo (__ld_info32, ldinfo_textorg);
- pinfo (__ld_info32, ldinfo_textsize);
- pinfo (__ld_info32, ldinfo_dataorg);
- pinfo (__ld_info32, ldinfo_datasize);
- pinfo (__ld_info32, ldinfo_filename);
- printf ("};\n");
-
- printf ("\n");
-
- printf ("static const struct ld_info_desc ld_info64_desc =\n{\n");
- pinfo (__ld_info64, ldinfo_next);
- pinfo (__ld_info64, ldinfo_fd);
- pinfo (__ld_info64, ldinfo_textorg);
- pinfo (__ld_info64, ldinfo_textsize);
- pinfo (__ld_info64, ldinfo_dataorg);
- pinfo (__ld_info64, ldinfo_datasize);
- pinfo (__ld_info64, ldinfo_filename);
- printf ("};\n");
-
- return 0;
- }
+#include <stddef.h>
+#include <stdio.h>
+#define __LDINFO_PTRACE32__
+#define __LDINFO_PTRACE64__
+#include <sys/ldr.h>
+
+#define pinfo(type,member) \
+ { \
+ struct type ldi = {0}; \
+ \
+ printf (" {%d, %d},\t/* %s */\n", \
+ offsetof (struct type, member), \
+ sizeof (ldi.member), \
+ #member); \
+ } \
+ while (0)
+
+int
+main (void)
+{
+ printf ("static const struct ld_info_desc ld_info32_desc =\n{\n");
+ pinfo (__ld_info32, ldinfo_next);
+ pinfo (__ld_info32, ldinfo_fd);
+ pinfo (__ld_info32, ldinfo_textorg);
+ pinfo (__ld_info32, ldinfo_textsize);
+ pinfo (__ld_info32, ldinfo_dataorg);
+ pinfo (__ld_info32, ldinfo_datasize);
+ pinfo (__ld_info32, ldinfo_filename);
+ printf ("};\n");
+
+ printf ("\n");
+
+ printf ("static const struct ld_info_desc ld_info64_desc =\n{\n");
+ pinfo (__ld_info64, ldinfo_next);
+ pinfo (__ld_info64, ldinfo_fd);
+ pinfo (__ld_info64, ldinfo_textorg);
+ pinfo (__ld_info64, ldinfo_textsize);
+ pinfo (__ld_info64, ldinfo_dataorg);
+ pinfo (__ld_info64, ldinfo_datasize);
+ pinfo (__ld_info64, ldinfo_filename);
+ printf ("};\n");
+
+ return 0;
+}
#endif /* 0 */
/* Layout of the 32bit version of struct ld_info. */
LONGEST
rs6000_aix_ld_info_to_xml (struct gdbarch *gdbarch, const gdb_byte *ldi_buf,
- gdb_byte *readbuf, ULONGEST offset, LONGEST len,
+ gdb_byte *readbuf, ULONGEST offset, ULONGEST len,
int close_ldinfo_fd)
{
struct obstack obstack;
rs6000_aix_core_xfer_shared_libraries_aix (struct gdbarch *gdbarch,
gdb_byte *readbuf,
ULONGEST offset,
- LONGEST len)
+ ULONGEST len)
{
struct bfd_section *ldinfo_sec;
int ldinfo_size;