This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: RFC: remove gdbarch from struct breakpoint
>>>>> "Ulrich" == Ulrich Weigand <uweigand@de.ibm.com> writes:
Ulrich> Most other architecture-dependent things in breakpoint.c etc really
Ulrich> should use a per-location architecture. However, the way the per-
Ulrich> location arch is currently chosen is to either determine it from
Ulrich> the location --but this works only if we find a symtab!-- or else
Ulrich> fall back to the main breakpoint architecture. If we remove that
Ulrich> fall back, there will be cases where breakpoints are set at locations
Ulrich> with no symtab (e.g. in generated code, stack trampolines, etc.)
Ulrich> and we will not find any associated architecture.
Ok, I see.
Why not just use the location's arch when parsing and re-parsing the
expression, though? With my patches this still defaults to the current
arch when the breakpoint is set -- this just isn't stored on the
breakpoint any more. (Now get_sal_arch tries to get the objfile arch as
a fallback, which I hope avoids any missing cases.)
Tom