Re: gdb.arch vs. gdb.base gcore test cases
Pedro Alves <[email protected]>
| Newsgroups | gmane.comp.gdb.devel |
|---|---|
| Message-ID | <[email protected]> |
On 05/03/2013 02:15 PM, Andreas Arnez wrote: > Pedro Alves <[email protected]> writes: > >> On 05/03/2013 12:15 PM, Andreas Arnez wrote: >>> The following two test cases are mostly identical, and their associated >>> C source files are exactly identical: >>> >>> gdb.arch/system-gcore.exp >>> gdb.base/gcore.exp >>> >>> Is there any specific reason for the two copies? Just curious... >> >> Well, what does git blame, and the initial submission of the >> corresponding patches say? The answer probably lies in what makes them >> "mostly identical" rather than "exactly identical" being arch >> specific. If the differences are really small, then we could merge >> them into gcore.exp, using istarget to guard the arch specific bits. ... > The x86-specific one is newer; it was introduced with this change: > > 2010-04-17 H.J. Lu <[email protected]> > > PR corefiles/11511 > * gdb.arch/system-gcore.exp: New. > * gdb.arch/gcore.c: Likewise. > > The only functional difference seems to be that system-gcore.exp adds a > new comparison (before/after) for the output from "info reg system". Did you check the original patch submission description in the mailing list archives for a possible rationale? Given that "system" is a predefined register group, I think "info reg system" works on all targets, though it might come out empty if no register is actually in that group on a given target. That seems fine for this test. -- Pedro Alves