On Thu, May 11, 2023 at 4:48 PM Simon Marchi via Gdb-patches < gdb-patches@sourceware.org> wrote: > I noticed some methods of syscall_catchpoint doing this: > > struct gdbarch *gdbarch = loc->owner->gdbarch; > > `loc` is the list of locations of this catchpoint. Logically, the owner > the locations are this catchpoint. So this just ends up getting > this->gdbarch. Remove the unnecessary indirection through the loc. > > syscall_catchpoint::print_recreate does something slightly different, > getting its arch from the loc: > > struct gdbarch *gdbarch = loc->gdbarch; > > I suppose it's always going to be the same arch, so get it from the > catchpoint there too. > > Change-Id: I6f6a6f8e0cd7cfb754cecfb6249e71ec12ba4855 > --- > gdb/break-catch-syscall.c | 6 ------ > 1 file changed, 6 deletions(-) > > > This change seems to be reasonable and I can confirm it causes no regression on aarch64 with Fedora-Rawhide.