Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Yue Lu <hacklu.newborn@gmail.com>
To: Richard Braun <rbraun@sceen.net>
Cc: Luis Machado <lgustavo@codesourcery.com>,
	gdb@sourceware.org, bug-hurd@gnu.org,
		Thomas Schwinge <thomas@codesourcery.com>
Subject: Re: how to continue from a breakpoint in GNU/Hurd
Date: Wed, 17 Jul 2013 16:07:00 -0000	[thread overview]
Message-ID: <CAB8fV=hvso0fYxZwm11DTYaZeGrdaMG9nzE04G1G-TbR6wyDOw@mail.gmail.com> (raw)
In-Reply-To: <20130717120954.GA26158@dalaran.sceen.net>

Hi.

On Wed, Jul 17, 2013 at 8:09 PM, Richard Braun <rbraun@sceen.net> wrote:
> On Wed, Jul 17, 2013 at 02:11:58PM +0800, Yue Lu wrote:
>> When I get the exception message, I set the EIP to the next instruction
>> (for instance 0x12345678), after resume it, I call get_thread_state(), and
>> found the EIP is still  0x12345678. The inferior never running anymore.
>
> I don't think it has anything to do with the instruction cache. Use the
> thread_info() call to determine what the suspend count is, it may have
> been incremented implicitely.

when I used thread_info() to check the suspend count, they are zero.
But I met a strange thing.
this is my code snippet:
thread_basic_info_data_t _info;
thread_basic_info_t info = &_info;
mach_msg_type_number_t info_len = THREAD_BASIC_INFO_COUNT;
error_t err =
  thread_info (thread->port, THREAD_BASIC_INFO, (int *) &info, &info_len);

after this call, the info turn out to be a  _NULL_ pointer. I think
something maybe wrong, but the err is zero.
In thread_takeover_sc_cmd() [gdb/gdb/gnu-nat.c] it has directly access
info after thread_info call, so I think this pointer never become a
NULL pointer, but in my code, it does. So I think something maybe
wrong, or this is a bug in gdb code.


--
Yue Lu (陆岳)


  reply	other threads:[~2013-07-17 16:07 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAB8fV=i04n-eHTxP=7hWRkB7O1VJobvrMc5KSHOX0SkJ3vuqhQ@mail.gmail.com>
2013-07-16 16:44 ` Luis Machado
2013-07-16 17:05   ` Yue Lu
2013-07-16 17:26     ` Luis Machado
     [not found]       ` <CAB8fV=jnOcYCGmQ_emcoE0ZYH6MjT3K3a1P8=svRR+nKSMD69A@mail.gmail.com>
2013-07-17 12:10         ` Richard Braun
2013-07-17 16:07           ` Yue Lu [this message]
2013-07-17 16:13             ` Richard Braun
2013-07-17 16:22               ` Yue Lu
2013-07-18  9:03                 ` Richard Braun
2013-07-16 16:45 Yue Lu
2013-07-16 17:29 ` Hui Zhu

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='CAB8fV=hvso0fYxZwm11DTYaZeGrdaMG9nzE04G1G-TbR6wyDOw@mail.gmail.com' \
    --to=hacklu.newborn@gmail.com \
    --cc=bug-hurd@gnu.org \
    --cc=gdb@sourceware.org \
    --cc=lgustavo@codesourcery.com \
    --cc=rbraun@sceen.net \
    --cc=thomas@codesourcery.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