From: Pedro Alves <pedro@codesourcery.com>
To: gdb-patches@sourceware.org
Cc: Kevin Buettner <kevinb@redhat.com>
Subject: Re: [RFC] remote-mips.c: Fix bit rot associated with the inferior's state
Date: Fri, 05 Mar 2010 15:53:00 -0000 [thread overview]
Message-ID: <201003051553.46571.pedro@codesourcery.com> (raw)
In-Reply-To: <20100304163319.30a3991e@redhat.com>
On Thursday 04 March 2010 23:33:19, Kevin Buettner wrote:
> Long term, I'm not sure what to do about this. Short term, I'd like
> to leave it as shown in the patch below - which is the same as the
> earlier patch that you've looked at.
That's fine.
>
> I tried setting attach_flag in the inferior and making mips_kill throw
> an error, but that messes up gdb.base/opaque.exp. Here's the relevant
> bit from the log file:
>
> (gdb) PASS: gdb.base/opaque.exp: ptype on opaque struct tagname (statically)
> dir
> Reinitialize source path to empty? (y or n) y
> Source directories searched: $cdir:$cwd
> (gdb) dir /ironwood1/sourceware-remote-mips/mips64vrel-elf/bld32/../../src/gdb/testsuite/gdb.base
> Source directories searched: /ironwood1/sourceware-remote-mips/mips64vrel-elf/bld32/../../src/gdb/testsuite/gdb.base:$cdir:$cwd
> (gdb) kill
> Kill the program being debugged? (y or n) y
> Can't kill this target.
> Use `detach' to disconnect from the target board's monitor.
> (gdb) file /mesquite2/sourceware-remote-mips/mips64vrel-elf/bld32/gdb/testsuite/gdb.base/opaque
> A program is being debugged already.
> Are you sure you want to change the file? (y or n) ERROR: couldn't load /mesquite2/sourceware-remote-mips/mips64vrel-elf/bld32/gdb/testsuite/gdb.base/opaque into /mesquite2/sourceware-remote-mips/mips64vrel-elf/bld32/gdb/testsuite/../../gdb/gdb (timed out).
> delete breakpoints
> Please answer y or n.
> A program is being debugged already.
> Are you sure you want to change the file? (y or n) ERROR: Delete all breakpoints in delete_breakpoints (timeout)
> break main
> Please answer y or n.
> A program is being debugged already.
> Are you sure you want to change the file? (y or n) UNRESOLVED: gdb.base/opaque.exp: setting breakpoint at main (timeout)
> ERROR: cannot run to breakpoint at main
>
I'd call it a test bug to be trying to kill on such
configuration, but then again, it's really strange that
there's no defined way to kill/reset the board. But really,
I'm super fine with what you have, as long as it works for you.
I'm surprised to find there's still use for this target (and
I confess that it was on my TODO list to garbage collect it);
AFAIK, modern MIPS debugging nowadays either goes either
through the remote protocol, or through MDI (remote-mdi.c).
> Below is my current patch.
>
> * remote-mips.c (gdbthread.h): Include.
> (remote_mips_ptid): Declare.
> (mips_error): Only mourn the inferior when inferior_ptid is non-null.
> (common_open): Set inferior_ptid, add it as an inferior, and
> as a thread too. Delete FIXME comment regarding start_remote().
> (mips_close): Invoke generic_mourn_inferior().
> (mips_kill): Make sure that target_mourn_inferior is invoked.
> (mips_mourn_inferior): Don't invoke generic_mourn_inferior, as
> it's now invoked from mips_close().
> (mips_load): Don't null out inferior_ptid. Don't call
> clear_symtab_users().
> (mips_thread_alive, mips_pid_to_str): New functions.
> (_initialize_remote_mips): Initialize remote_mips_ptid. Initialize
> to_thread_alive and to_pid_to_str operations.
Looks good to me. Thanks.
--
Pedro Alves
next prev parent reply other threads:[~2010-03-05 15:53 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-02 0:25 Kevin Buettner
2010-03-02 23:09 ` Kevin Buettner
2010-03-02 23:37 ` Pedro Alves
2010-03-03 23:44 ` Kevin Buettner
2010-03-04 0:33 ` Pedro Alves
2010-03-04 23:33 ` Kevin Buettner
2010-03-05 15:53 ` Pedro Alves [this message]
2010-03-05 16:26 ` Kevin Buettner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201003051553.46571.pedro@codesourcery.com \
--to=pedro@codesourcery.com \
--cc=gdb-patches@sourceware.org \
--cc=kevinb@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox