This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [rfc] Infrastructure to disable breakpoints during inferior startup
- From: Tom Tromey <tromey at redhat dot com>
- To: Pedro Alves <pedro at codesourcery dot com>
- Cc: gdb-patches at sourceware dot org, "Ulrich Weigand" <uweigand at de dot ibm dot com>, Jan Kratochvil <jkratoch at redhat dot com>
- Date: Fri, 24 Jul 2009 16:05:27 -0600
- Subject: Re: [rfc] Infrastructure to disable breakpoints during inferior startup
- References: <200907231631.n6NGV2xR018887@d12av02.megacenter.de.ibm.com> <200907231751.01413.pedro@codesourcery.com>
- Reply-to: Tom Tromey <tromey at redhat dot com>
>>>>> "Pedro" == Pedro Alves <pedro@codesourcery.com> writes:
Pedro> BTW, I haven't had much of a chance to touch the multi-exec
Pedro> patches since I posted them last. I was mostly waiting to see if
Pedro> people had comments on the general design, and on the user
Pedro> interface before proceeding further with it. If there's anything
Pedro> I should do to make that (testing, review, comments) easier on
Pedro> others, please let me know.
I've been meaning to try this for a while.
Today I finally got around to applying it. The patch didn't apply
cleanly (nothing serious), and also had a couple problems compiling once
I did apply it.
I've appended my cleanup patch. One of the rs6000-tdep.c hunks is just
a temporary workaround for unrelated build breakage.
I put all this on a local git branch. I can push it to the archer
repository if you, or anybody, wants to see it there.
I still haven't actually tried it, but I hope to do so soon.
Tom
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c
index 51e8bbd..9cf5057 100644
--- a/gdb/mips-tdep.c
+++ b/gdb/mips-tdep.c
@@ -2490,7 +2490,7 @@ mips_software_single_step (struct frame_info *frame)
CORE_ADDR pc, next_pc;
pc = get_frame_pc (frame);
- if (deal_with_atomic_sequence (gdbarch, pc))
+ if (deal_with_atomic_sequence (gdbarch, aspace, pc))
return 1;
next_pc = mips_next_pc (frame, pc);
diff --git a/gdb/monitor.c b/gdb/monitor.c
index 4cdfaae..4f258a9 100644
--- a/gdb/monitor.c
+++ b/gdb/monitor.c
@@ -705,6 +705,7 @@ monitor_open (char *args, struct monitor_ops *mon_ops, int from_tty)
{
char *name;
char **p;
+ struct inferior *inf;
if (mon_ops->magic != MONITOR_OPS_MAGIC)
error (_("Magic number of monitor_ops struct wrong."));
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
index bc787f3..1d37eda 100644
--- a/gdb/rs6000-tdep.c
+++ b/gdb/rs6000-tdep.c
@@ -1075,7 +1075,7 @@ int
ppc_deal_with_atomic_sequence (struct frame_info *frame)
{
struct gdbarch *gdbarch = get_frame_arch (frame);
- struct gdbarch *aspace = get_frame_address_space (frame);
+ struct address_space *aspace = get_frame_address_space (frame);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
CORE_ADDR pc = get_frame_pc (frame);
CORE_ADDR breaks[2] = {-1, -1};
@@ -2950,8 +2950,8 @@ static struct variant variants[] =
bfd_mach_rs6k, &tdesc_rs6000},
{"403", "IBM PowerPC 403", bfd_arch_powerpc,
bfd_mach_ppc_403, &tdesc_powerpc_403},
- {"405", "IBM PowerPC 405", bfd_arch_powerpc,
- bfd_mach_ppc_405, &tdesc_powerpc_405},
+/* {"405", "IBM PowerPC 405", bfd_arch_powerpc, */
+/* bfd_mach_ppc_405, &tdesc_powerpc_405}, */
{"601", "Motorola PowerPC 601", bfd_arch_powerpc,
bfd_mach_ppc_601, &tdesc_powerpc_601},
{"602", "Motorola PowerPC 602", bfd_arch_powerpc,
diff --git a/gdb/spu-tdep.c b/gdb/spu-tdep.c
index 4725757..0733824 100644
--- a/gdb/spu-tdep.c
+++ b/gdb/spu-tdep.c
@@ -1338,7 +1338,7 @@ spu_software_single_step (struct frame_info *frame)
target = target & (SPU_LS_SIZE - 1);
if (target != next_pc)
- insert_single_step_breakpoint (gdbarch, target);
+ insert_single_step_breakpoint (gdbarch, aspace, target);
}
return 1;