This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Provide dummy SSE registers in i387_supply_fsave


Andrew Cagney <cagney@gnu.org> writes:

> > Jim's patch to assert that target_fetch_registers did its job broke
> > OpenBSD/i386 and probably most other i386 native debuggers.  The
> > attached patch fixes this.
> > I am wondering however.how this affects other platforms and remote
> > targets.
> 
> Hmm,
> 
> Jim, which systems did the assert patch get tested on?

IA-32 and PowerPC Linux.  i386-linux-nat.c:supply_fpregset calls
dummy_sse_values, which provides the contents of the %xmm registers,
which is what Mark ran into.

This is the concern I was getting at in the first paragraph of the
patch post: the assert is clearly a "fair" check on
target_fetch_registers ("I asked you for this register, and you said
'okay'; were you telling the truth?") and it's clearly a condition
developers would want to know about (using the contents of a register
marked as not valid).  But at the same time, it's easy to believe that
there are lots of register sets in various architectures that have
grown beyond the ability of some targets to fetch.

If it's the case that many arch/target combinations will trigger the
assert, then an assert is too aggressive, and it should probably be a
warning instead.  But silently supplying dummy bits is pretty
unsatisfactory.  As a developer, I wanted to know that regcache.c was
happily fetching invalid contents.  And as a user, I'd like something
more than a suspicious bit pattern to tell me that a given register is
unavailable.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]