public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug server/15959] New: GDBserver hangs when started with --wrapper
@ 2013-09-16 14:30 qiyao at gcc dot gnu.org
  2013-09-17  3:59 ` [Bug server/15959] " qiyao at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: qiyao at gcc dot gnu.org @ 2013-09-16 14:30 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=15959

            Bug ID: 15959
           Summary: GDBserver hangs when started with --wrapper
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: server
          Assignee: unassigned at sourceware dot org
          Reporter: qiyao at gcc dot gnu.org

Use option --wrapper for first time, and get GDBserver hang there,

$ ./gdbserver/gdbserver --wrapper env TEST=5 -- :1234 ../foo.exe
Process ../foo.exe created; pid = 15074

GDB shows it hangs in sigsuspend

#0  0xb77ae424 in __kernel_vsyscall ()
#1  0x4ce9fd47 in sigsuspend () from /lib/libc.so.6
#2  0x080712f8 in my_waitpid (pid=pid@entry=-1, status=status@entry=0xbf97cff4,
flags=-2147483647, flags@entry=1073741824)
    at ../../../../git/gdb/gdbserver/../nat/linux-waitpid.c:100
#3  0x0806954a in linux_wait_for_lwp (options=1073741824, wstatp=0xbf97cff4,
ptid=...) at ../../../../git/gdb/gdbserver/linux-low.c:1290
#4  linux_wait_for_event (ptid=..., wstat=wstat@entry=0xbf97cff4,
options=options@entry=1073741824) at
../../../../git/gdb/gdbserver/linux-low.c:1845
#5  0x0806a46c in linux_wait_1 (ptid=..., ourstatus=ourstatus@entry=0x80919f0
<last_status>, target_options=target_options@entry=0)
    at ../../../../git/gdb/gdbserver/linux-low.c:2308
#6  0x0806b3b2 in linux_wait (ptid=..., ourstatus=0x80919f0 <last_status>,
target_options=0) at ../../../../git/gdb/gdbserver/linux-low.c:2782
#7  0x0805707c in mywait (ptid=..., ourstatus=ourstatus@entry=0x80919f0
<last_status>, options=options@entry=0, connected_wait=connected_wait@entry=0)
    at ../../../../git/gdb/gdbserver/target.c:83
#8  0x080510ac in start_inferior (argv=0x90701e8) at
../../../../git/gdb/gdbserver/server.c:272
#9  0x0804a379 in main (argc=7, argv=0xbf97d244) at
../../../../git/gdb/gdbserver/server.c:2912

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug server/15959] GDBserver hangs when started with --wrapper
  2013-09-16 14:30 [Bug server/15959] New: GDBserver hangs when started with --wrapper qiyao at gcc dot gnu.org
@ 2013-09-17  3:59 ` qiyao at gcc dot gnu.org
  2013-09-18  2:00 ` cvs-commit at gcc dot gnu.org
  2013-09-18  2:01 ` qiyao at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: qiyao at gcc dot gnu.org @ 2013-09-17  3:59 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=15959

Yao Qi <qiyao at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at sourceware dot org   |qiyao at gcc dot gnu.org

--- Comment #1 from Yao Qi <qiyao at gcc dot gnu.org> ---
'git bisect' tells me that the this is the bad commit.

$ git bisect bad                                                                
6876850721768f002bdebf47ea013b6283403d37 is the first bad commit                
commit 6876850721768f002bdebf47ea013b6283403d37                                 
Author: Pedro Alves <palves@redhat.com>                                         
Date:   Thu May 23 17:17:50 2013 +0000                                          

    range stepping: gdbserver (x86 GNU/Linux)                                   

    This patch adds support for range stepping to GDBserver, teaching it        
    about vCont;r.                                                              

    It'd be easy to enable this for all hardware single-step targets            
    without needing the linux_target_ops hook, however, at least PPC needs      
    special care, due to the fact that PPC atomic sequences can't be            
    hardware single-stepped through, a thing which GDBserver doesn't know       
    about.  So this leaves the support limited to x86/x86_64.                   

    gdb/                                                                        
    2013-05-23  Pedro Alves  <palves@redhat.com>                                

        * NEWS: Mention GDBserver range stepping support.                       

    gdb/gdbserver/                                                              
    2013-05-23  Yao Qi  <yao@codesourcery.com>                                  
            Pedro Alves  <palves@redhat.com>                                    

        * linux-low.c (lwp_in_step_range): New function.                        
        (linux_wait_1): If the thread was range stepping and stopped            
        outside the stepping range, report the stop to GDB.  Otherwise,         
        continue stepping.  Add range stepping debug output.                    
        (linux_set_resume_request): Copy the step range from the resume         
        request to the lwp.                                                     
        (linux_supports_range_stepping): New.                                   
        (linux_target_ops) <supports_range_stepping>: Set to                    
        linux_supports_range_stepping.                                          
        * linux-low.h (struct linux_target_ops)                                 
        <supports_range_stepping>: New field.                                   
        (struct lwp_info) <step_range_start, step_range_end>: New fields.       
        * linux-x86-low.c (x86_supports_range_stepping): New.                   
        (the_low_target) <supports_range_stepping>: Set to                      
        x86_supports_range_stepping.                                            
        * server.c (handle_v_cont): Handle 'r' action.                          
        (handle_v_requests): Append ";r" if the target supports range           
        stepping.                                                               
        * target.h (struct thread_resume) <step_range_start,                    
        step_range_end>: New fields.                                            
        (struct target_ops) <supports_range_stepping>:                          
        New field.                                                              
        (target_supports_range_stepping): New macro.                            

:040000 040000 589d7012bc4251860fbd2d58331ed2a8f58ae61b
ff6f44eb52779599f339d0461f92a54bfcd924dc M      gdb

In this commit, we added two fields in 'struct thread_resume', but these two
fields are not initialized properly in 'start_inferior',

       struct thread_resume resume_info;

       resume_info.thread = pid_to_ptid (signal_pid);
       resume_info.kind = resume_continue;
       resume_info.sig = 0;

I'll post a patch.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug server/15959] GDBserver hangs when started with --wrapper
  2013-09-16 14:30 [Bug server/15959] New: GDBserver hangs when started with --wrapper qiyao at gcc dot gnu.org
  2013-09-17  3:59 ` [Bug server/15959] " qiyao at gcc dot gnu.org
@ 2013-09-18  2:00 ` cvs-commit at gcc dot gnu.org
  2013-09-18  2:01 ` qiyao at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2013-09-18  2:00 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=15959

--- Comment #2 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
CVSROOT:    /cvs/src
Module name:    src
Changes by:    qiyao@sourceware.org    2013-09-18 01:59:59

Modified files:
    gdb/gdbserver  : ChangeLog server.c 
    gdb/testsuite  : ChangeLog 
Added files:
    gdb/testsuite/gdb.server: wrapper.c wrapper.exp 

Log message:
    gdb/gdbserver/

    2013-09-18  Yao Qi  <yao@codesourcery.com>

    PR server/15959
    * server.c (start_inferior): Clear 'resume_info'.

    gdb/testsuite/

    2013-09-18  Yao Qi  <yao@codesourcery.com>

    * gdb.server/wrapper.c: New.
    * gdb.server/wrapper.exp: New.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/gdbserver/ChangeLog.diff?cvsroot=src&r1=1.772&r2=1.773
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/gdbserver/server.c.diff?cvsroot=src&r1=1.200&r2=1.201
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/ChangeLog.diff?cvsroot=src&r1=1.3811&r2=1.3812
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.server/wrapper.c.diff?cvsroot=src&r1=NONE&r2=1.1
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.server/wrapper.exp.diff?cvsroot=src&r1=NONE&r2=1.1

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug server/15959] GDBserver hangs when started with --wrapper
  2013-09-16 14:30 [Bug server/15959] New: GDBserver hangs when started with --wrapper qiyao at gcc dot gnu.org
  2013-09-17  3:59 ` [Bug server/15959] " qiyao at gcc dot gnu.org
  2013-09-18  2:00 ` cvs-commit at gcc dot gnu.org
@ 2013-09-18  2:01 ` qiyao at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: qiyao at gcc dot gnu.org @ 2013-09-18  2:01 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=15959

Yao Qi <qiyao at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED
   Target Milestone|---                         |7.7

--- Comment #3 from Yao Qi <qiyao at gcc dot gnu.org> ---
Fixed.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-09-18  2:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-16 14:30 [Bug server/15959] New: GDBserver hangs when started with --wrapper qiyao at gcc dot gnu.org
2013-09-17  3:59 ` [Bug server/15959] " qiyao at gcc dot gnu.org
2013-09-18  2:00 ` cvs-commit at gcc dot gnu.org
2013-09-18  2:01 ` qiyao at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).