Re: [PATCH] [gdb/tdep] Backport i386_canonicalize_syscall rewrite to gdb-16-branch

Andrew Burgess
2025-03-13T15:10:13Z

Tom de Vries <tdevries@suse.de> writes:

> Commit fbfb29b304e ("[gdb/tdep] Rewrite i386_canonicalize_syscall") fixes
> PR32770, which reproduces on the gdb-16-branch, but the commit is not ideal
> for backporting because it completely rewrites i386_canonicalize_syscall.
>
> Instead, this is a version of the patch that adds a single line entry for each
> syscall value for which i386_canonicalize_syscall gives a different result
> with and without the patch.
>
> Consequently, the two versions give identical results. I've checked this for
> syscalls 0 to 466.

Given you've shown that this is equivalent to the version in
fbfb29b304e, and having taken a look at that commit, I'd be just as
happy to see that commit merged into the gdb-16-branch. The patch isn't
small, but equally, it's pretty contained and straight forward, so I
don't see huge risk there.

But if you're happier with this approach in the gdb-16-branch, that's
fine with me.

Approved-By: Andrew Burgess <aburgess@redhat.com>

Thanks,
Andrew

>
> Tested on x86_64-linux with target board unix/-m32, on top of gdb-16-branch.
>
> PR tdep/32770
> Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=32770