Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Marc Khouzam <marc.khouzam@ericsson.com>
To: "'Tom Tromey'" <tromey@redhat.com>
Cc: "'sami wagiaalla'" <swagiaal@redhat.com>,
	       "'gdb-patches@sourceware.org'"
	<gdb-patches@sourceware.org>
Subject: RE: Patch for non-stop remote assertion
Date: Mon, 25 Apr 2011 18:31:00 -0000	[thread overview]
Message-ID: <F7CE05678329534C957159168FA70DEC577E7D8508@EUSAACMS0703.eamcs.ericsson.se> (raw)
In-Reply-To: <m3sjt6uro1.fsf@fleche.redhat.com>

> -----Original Message-----
> From: Tom Tromey [mailto:tromey@redhat.com] 
> Sent: Monday, April 25, 2011 2:12 PM
> To: Marc Khouzam
> Cc: 'sami wagiaalla'; 'gdb-patches@sourceware.org'
> Subject: Re: Patch for non-stop remote assertion
> 
> >>>>> "Marc" == Marc Khouzam <marc.khouzam@ericsson.com> writes:
> 
> Marc> #7  0x081b79b6 in is_thread_state (ptid=..., 
> state=THREAD_EXITED) at ../../src/gdb/thread.c:620
> Marc> #8  0x081b7a17 in is_exited (ptid=...) at 
> ../../src/gdb/thread.c:633
> Marc> #9  0x080a5143 in has_stack_frames () at 
> ../../src/gdb/frame.c:1336
> Marc> #10 0x081ce2f4 in get_current_arch () at 
> ../../src/gdb/arch-utils.c:757
> Marc> #11 0x08132b48 in python_on_resume (ptid=...) at 
> ../../src/gdb/python/py-inferior.c:103
> 
> I think the last time this came up, we established that it is 
> not ok to
> call get_current_arch at this point.
> 
> Basically, this is a botch in the Python API -- we designed it
> improperly :(
> 
> Maybe this code (and a few associated functions) could use
> target_gdbarch for the time being.  That is safer and 
> probably will not
> lead to reduced functionality.
> 
> Could you try the appended?

Thanks!  That works.  No more assertion and I can do
extended-remote debugging.

I noticed a third use of get_current_arch () in that file,
within method python_on_normal_stop ().  Should that one be
changed also?

How do you want to move forward with this?

Thanks again

Marc

> 
> Tom
> 
> diff --git a/gdb/python/py-inferior.c b/gdb/python/py-inferior.c
> index b9df394..45f5f04 100644
> --- a/gdb/python/py-inferior.c
> +++ b/gdb/python/py-inferior.c
> @@ -100,7 +100,7 @@ python_on_resume (ptid_t ptid)
>  {
>    struct cleanup *cleanup;
>  
> -  cleanup = ensure_python_env (get_current_arch (), 
> current_language);
> +  cleanup = ensure_python_env (target_gdbarch, current_language);
>  
>    if (emit_continue_event (ptid) < 0)
>      gdbpy_print_stack ();
> @@ -116,7 +116,7 @@ python_inferior_exit (struct inferior *inf)
>    ptid_t ptidp;
>    struct target_waitstatus status;
>  
> -  cleanup = ensure_python_env (get_current_arch (), 
> current_language);
> +  cleanup = ensure_python_env (target_gdbarch, current_language);
>  
>    get_last_target_status (&ptidp, &status);
>  
> 


  reply	other threads:[~2011-04-25 18:31 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-04 15:54 [patch] Support inferior events in python sami wagiaalla
2011-01-04 18:22 ` Eli Zaretskii
2011-01-04 20:09 ` Tom Tromey
2011-01-17 22:59   ` sami wagiaalla
2011-01-19 16:42     ` Tom Tromey
2011-01-21 23:06       ` sami wagiaalla
2011-01-28 16:21         ` Tom Tromey
2011-02-02 21:04           ` sami wagiaalla
2011-02-02 21:35             ` Tom Tromey
2011-02-03 16:41               ` sami wagiaalla
2011-02-03 18:26                 ` Eli Zaretskii
2011-02-03 19:45                   ` sami wagiaalla
2011-02-03 21:42                 ` Tom Tromey
2011-02-04 20:07                   ` sami wagiaalla
2011-02-04 20:29                     ` Tom Tromey
2011-02-04 20:35                       ` sami wagiaalla
2011-02-04 23:00                         ` Paul Pluzhnikov
2011-02-05  5:44                           ` Hui Zhu
2011-02-07 15:22                             ` sami wagiaalla
2011-02-07 15:24                               ` Tom Tromey
2011-02-07 15:34                                 ` Paul Pluzhnikov
2011-02-07 16:01                                   ` sami wagiaalla
2011-02-07 15:39                                 ` sami wagiaalla
2011-04-20 20:26                         ` Patch for non-stop remote assertion (was: RE: [patch] Support inferior events in python) Marc Khouzam
2011-04-25 18:12                           ` Patch for non-stop remote assertion Tom Tromey
2011-04-25 18:31                             ` Marc Khouzam [this message]
2011-05-16 15:41                               ` Marc Khouzam
2011-05-19 18:38                               ` Tom Tromey
2011-02-09  7:55                     ` [patch] Support inferior events in python Jan Kratochvil
2011-02-09 16:19                       ` sami wagiaalla
2011-02-09 16:30                         ` Jan Kratochvil
2011-02-11 15:28                           ` sami wagiaalla
2011-02-11 15:55                             ` Joel Brobecker
2011-02-11 19:19                               ` sami wagiaalla
2011-02-11 19:46                                 ` Jan Kratochvil
2011-02-11 15:57                             ` Pedro Alves
2011-02-14 17:36                               ` sami wagiaalla
2011-02-16 11:48                                 ` Jan Kratochvil
2011-07-06 19:42                                   ` Jan Kratochvil
2011-07-07 13:51                                     ` sami wagiaalla
2011-07-07 14:03                                       ` Jan Kratochvil
2011-09-13 21:45                                       ` Jan Kratochvil

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=F7CE05678329534C957159168FA70DEC577E7D8508@EUSAACMS0703.eamcs.ericsson.se \
    --to=marc.khouzam@ericsson.com \
    --cc=gdb-patches@sourceware.org \
    --cc=swagiaal@redhat.com \
    --cc=tromey@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