[01/02] remote-mips.c, always a thread (take 2)

Pedro Alves pedro@codesourcery.com
Tue Aug 19 19:38:00 GMT 2008


On Monday 18 August 2008 14:07:34, Pedro Alves wrote:
> On Monday 18 August 2008 13:29:28, Pedro Alves wrote:
> > - mips_load was clearing inferior_ptid, and calling clear_symtab_users. 
> > I notice that inferior_ptid is being cleared after a load command, but
> > that is wrong, I believe.  See this change of Jim's to monitor.c, that
> > removed this clearing from the monitor target:
> >    http://sourceware.org/ml/gdb/2001-09/msg00125.html
> >
> >   I'm applying the exact same reasoning and change here.
>
> Hmmm, I just noticed that mips_kill is being used to interrupting
> the target ( '\03' / ^C / SIGINT ), instead of installing a SIGINT
> handler like at least monitor.c, remote.c and remote-sim.c do.
> This looks broken to me -- target_kill is definitelly not the
> right target method for this (and neither is the "kill" command).

This patch makes the remote-mips target register a SIGINT handler
instead, like monitor.c does.

Of course, only after doing this, I noticed that that there's
no configuration currently that builds this file...

I've checked that this at least builds after tweaking configure.tgt
to include it in a --target=mips-elf build.  CS has a similar tweak
in its internal trees, but AFAIK we don't have customers
using this target either.

To make this build, I also needed to change regcache_set_valid_p to
regcache_invalidate.  regcache_set_valid_p isn't defined anywhere.

It seems it would supposed to go in with this:
http://sourceware.org/ml/gdb-patches/2007-12/msg00150.html

But only the remote-mips.c bits went in.

Anyway, as long as I've written it the patch here it is.

-- 
Pedro Alves
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 001-remote_mips_kill.diff
Type: text/x-diff
Size: 6272 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20080819/58e0ba86/attachment.bin>


More information about the Gdb-patches mailing list