-2002-07-19 Michael Snyder <msnyder@redhat.com>
+2002-07-22 Kevin Buettner <kevinb@redhat.com>
+
+ * aix-thread.c (language.h): Include.
+ (ptrace_check, pdc_symbol_addrs, pdc_read_regs, pdc_write_regs)
+ (pdc_read_data, pdc_write_data, pdc_alloc, pdc_realloc, pdc_dealloc):
+ Print newlines at end of debug messages.
+ (pdc_symbol_addrs, pdc_read_regs, pdc_write_regs, pdc_read_data)
+ (pdc_write_data): Use local_hex_string() instead of %llx formats.
+
+2002-07-22 Kevin Buettner <kevinb@redhat.com>
+
+ * aix-thread.c (ppc-tdep.h): Include.
+ (special_register_p): New function.
+ (supply_sprs64, supply_sprs32, fill_sprs64, fill_sprs32)
+ (store_regs_user_thread): Use register number information from
+ gdbarch_tdep struct instead of hardcoded offsets relative to
+ FIRST_UISA_SP_REGNUM.
+ (fetch_regs_kernel_thread, store_regs_kernel_thread): Call
+ special_register_p() instead of using FPLAST_REGNUM and
+ LAST_UISA_SP_REGNUM as lower and upper bounds on the special
+ register numbers. Also, don't assume that LAST_UISA_SP_REGNUM
+ will be MQ's register number.
+
+2002-07-22 Michael Snyder <msnyder@redhat.com>
* aix-thread.c (ops): Rename to aix_thread_ops.
(base_ops): Rename to base_target.
(store_regs_lib): Rename to store_regs_user_thread.
(store_regs_kern): Rename to store_regs_kernel_thread.
-2002-07-18 Michael Snyder <msnyder@redhat.com>
+2002-07-22 Michael Snyder <msnyder@redhat.com>
* aix-thread.c (ops_prepare_to_store): Eliminate.
(init_ops): Don't initialize ops.prepare_to_store.
#include "inferior.h"
#include "regcache.h"
#include "gdbcmd.h"
+#include "language.h" /* for local_hex_string() */
+#include "ppc-tdep.h"
#if 0
#include "coff/internal.h" /* for libcoff.h */
#endif
#include <sched.h>
#include <sys/pthdebug.h>
-#include "ppc-tdep.h"
/* Whether to emit debugging output. */
static int debug_aix_thread;
{
if (debug_aix_thread)
fprintf_unfiltered (gdb_stdlog,
- "ptrace (%d, %d) = %d (errno = %d)",
+ "ptrace (%d, %d) = %d (errno = %d)\n",
req, id, ret, errno);
return ret == -1 ? 0 : 1;
}
if (debug_aix_thread)
fprintf_unfiltered (gdb_stdlog,
- "pdc_symbol_addrs (user = %ld, symbols = 0x%lx, count = %d)",
+ "pdc_symbol_addrs (user = %ld, symbols = 0x%lx, count = %d)\n",
user, (long) symbols, count);
for (i = 0; i < count; i++)
name = symbols[i].name;
if (debug_aix_thread)
fprintf_unfiltered (gdb_stdlog,
- " symbols[%d].name = \"%s\"", i, name);
+ " symbols[%d].name = \"%s\"\n", i, name);
if (!*name)
symbols[i].addr = 0;
if (!(ms = lookup_minimal_symbol (name, NULL, NULL)))
{
if (debug_aix_thread)
- fprintf_unfiltered (gdb_stdlog, " returning PDC_FAILURE");
+ fprintf_unfiltered (gdb_stdlog, " returning PDC_FAILURE\n");
return PDC_FAILURE;
}
symbols[i].addr = SYMBOL_VALUE_ADDRESS (ms);
}
if (debug_aix_thread)
- fprintf_unfiltered (gdb_stdlog, " symbols[%d].addr = 0x%llx",
- i, symbols[i].addr);
+ fprintf_unfiltered (gdb_stdlog, " symbols[%d].addr = %s\n",
+ i, local_hex_string (symbols[i].addr));
}
if (debug_aix_thread)
- fprintf_unfiltered (gdb_stdlog, " returning PDC_SUCCESS");
+ fprintf_unfiltered (gdb_stdlog, " returning PDC_SUCCESS\n");
return PDC_SUCCESS;
}
struct ptsprs sprs32;
if (debug_aix_thread)
- fprintf_unfiltered (gdb_stdlog, "pdc_read_regs tid=%d flags=%llx\n",
- (int) tid, flags);
+ fprintf_unfiltered (gdb_stdlog, "pdc_read_regs tid=%d flags=%s\n",
+ (int) tid, local_hex_string (flags));
/* General-purpose registers. */
if (flags & PTHDB_FLAG_GPRS)
however this code is untested. */
if (debug_aix_thread)
- fprintf_unfiltered (gdb_stdlog, "pdc_write_regs tid=%d flags=%llx\n",
- (int) tid, flags);
+ fprintf_unfiltered (gdb_stdlog, "pdc_write_regs tid=%d flags=%s\n",
+ (int) tid, local_hex_string (flags));
/* General-purpose registers. */
if (flags & PTHDB_FLAG_GPRS)
if (debug_aix_thread)
fprintf_unfiltered (gdb_stdlog,
- "pdc_read_data (user = %ld, buf = 0x%lx, addr = 0x%llx, len = %ld)",
- user, (long) buf, addr, len);
+ "pdc_read_data (user = %ld, buf = 0x%lx, addr = %s, len = %ld)\n",
+ user, (long) buf, local_hex_string (addr), len);
status = target_read_memory (addr, buf, len);
ret = status == 0 ? PDC_SUCCESS : PDC_FAILURE;
if (debug_aix_thread)
- fprintf_unfiltered (gdb_stdlog, " status=%d, returning %s",
+ fprintf_unfiltered (gdb_stdlog, " status=%d, returning %s\n",
status, pd_status2str (ret));
return ret;
}
if (debug_aix_thread)
fprintf_unfiltered (gdb_stdlog,
- "pdc_write_data (user = %ld, buf = 0x%lx, addr = 0x%llx, len = %ld)",
- user, (long) buf, addr, len);
+ "pdc_write_data (user = %ld, buf = 0x%lx, addr = %s, len = %ld)\n",
+ user, (long) buf, local_hex_string (addr), len);
status = target_write_memory (addr, buf, len);
ret = status == 0 ? PDC_SUCCESS : PDC_FAILURE;
if (debug_aix_thread)
- fprintf_unfiltered (gdb_stdlog, " status=%d, returning %s", status,
+ fprintf_unfiltered (gdb_stdlog, " status=%d, returning %s\n", status,
pd_status2str (ret));
return ret;
}
{
if (debug_aix_thread)
fprintf_unfiltered (gdb_stdlog,
- "pdc_alloc (user = %ld, len = %ld, bufp = 0x%lx)",
+ "pdc_alloc (user = %ld, len = %ld, bufp = 0x%lx)\n",
user, len, (long) bufp);
*bufp = xmalloc (len);
if (debug_aix_thread)
fprintf_unfiltered (gdb_stdlog,
- " malloc returned 0x%lx", (long) *bufp);
+ " malloc returned 0x%lx\n", (long) *bufp);
/* Note: xmalloc() can't return 0; therefore PDC_FAILURE will never
be returned. */
{
if (debug_aix_thread)
fprintf_unfiltered (gdb_stdlog,
- "pdc_realloc (user = %ld, buf = 0x%lx, len = %ld, bufp = 0x%lx)",
+ "pdc_realloc (user = %ld, buf = 0x%lx, len = %ld, bufp = 0x%lx)\n",
user, (long) buf, len, (long) bufp);
*bufp = xrealloc (buf, len);
if (debug_aix_thread)
fprintf_unfiltered (gdb_stdlog,
- " realloc returned 0x%lx", (long) *bufp);
+ " realloc returned 0x%lx\n", (long) *bufp);
return *bufp ? PDC_SUCCESS : PDC_FAILURE;
}
{
if (debug_aix_thread)
fprintf_unfiltered (gdb_stdlog,
- "pdc_free (user = %ld, buf = 0x%lx)", user,
+ "pdc_free (user = %ld, buf = 0x%lx)\n", user,
(long) buf);
xfree (buf);
return PDC_SUCCESS;