NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/16284 running function in stoped gdb ...



On Sunday 03 January 2010 21:10:06 David Laight wrote:
> The following reply was made to PR kern/16284; it has been noted by GNATS.
> 
> From: David Laight <david%l8s.co.uk@localhost>
> To: gnats-bugs%netbsd.org@localhost
> Cc:
> Subject: Re: kern/16284 running function in stoped gdb ...
> Date: Sun, 3 Jan 2010 21:07:54 +0000
> 
>  This still happens, errno is unchanged and the 'ret' value
>  from select() seems to be undefined.

It works for me on NetBSD/i386 netbsd-5 from around Dec 12th.

Where do you see the problem?

>  ktrace shows a 'RET syscall 0' for the return from select
>  errno is unchanged (unless set in the called function).
> 
>  gdb has to do some horrid stuff in order to call a process
>  function - and even the 'success' result is lost.
> 
>  Sometimes, but not always, I also see almost 2 seconds delay before
>  the output from the called function - not sure where that delay comes
>  from. (A 2nd ^C gives a "Corrupt Obj_Entry pointer in GOT" error.)
> 
>  Anyone know the ptrace interface well enough to know what gdb is
>  trying to do ?

set debug infrun 1

See below

> 
>       David
> 

Nick
-- 

kenny$ gdb bar                                                                  
                                                                          
GNU gdb 6.5                                                                     
                                                                          
Copyright (C) 2006 Free Software Foundation, Inc.                               
                                                                          
GDB is free software, covered by the GNU General Public License, and you are    
                                                                          
welcome to change it and/or distribute copies of it under certain conditions.   
                                                                          
Type "show copying" to see the conditions.                                      
                                                                          
There is absolutely no warranty for GDB.  Type "show warranty" for details.     
                                                                          
This GDB was configured as "i386--netbsdelf"...                                 
                                                                          
(gdb) set debug infrun 1                                                        
                                                                          
(gdb) run                                                                       
                                                                          
Starting program: /tmp/bar                                                      
                                                                          
infrun: wait_for_inferior                                                       
                                                                          
infrun: infwait_normal_state                                                    
                                                                          
infrun: TARGET_WAITKIND_STOPPED                                                 
                                                                          
infrun: stop_pc = 0xbbbf4770                                                    
                                                                          
infrun: quietly stopped                                                         
                                                                          
infrun: stop_stepping                                                           
                                                                          
infrun: resume (step=0, signal=0)                                               
                                                                          
infrun: wait_for_inferior                                                       
                                                                          
infrun: infwait_normal_state                                                    
                                                                          
infrun: TARGET_WAITKIND_STOPPED                                                 
                                                                          
infrun: stop_pc = 0xbbbf4770                                                    
                                                                          
infrun: quietly stopped                                                         
                                                                          
infrun: stop_stepping                                                           
                                                                          
infrun: proceed (addr=0xffffffff, signal=0, step=0)                             
                                                                          
infrun: resume (step=0, signal=0)                                               
                                                                          
infrun: wait_for_inferior                                                       
                                                                          
infrun: infwait_normal_state
infrun: TARGET_WAITKIND_STOPPED
infrun: stop_pc = 0xbbbf4ab8
infrun: BPSTATE_WHAT_CHECK_SHLIBS
infrun: no stepping, continue
infrun: resume (step=1, signal=0)
infrun: prepare_to_wait
infrun: infwait_normal_state
infrun: TARGET_WAITKIND_STOPPED
infrun: stop_pc = 0xbbbf5d72
infrun: trap expected
infrun: no stepping, continue
infrun: resume (step=0, signal=0)
infrun: prepare_to_wait
^Cinfrun: infwait_normal_state
infrun: TARGET_WAITKIND_STOPPED
infrun: stop_pc = 0xbbb1ba87
infrun: random signal 2

Program received signal SIGINT, Interrupt.
infrun: stop_stepping
0xbbb1ba87 in select () from /usr/lib/libc.so.12
(gdb) p foo()
infrun: proceed (addr=0x804877c, signal=0, step=0)
infrun: resume (step=0, signal=0)
infrun: wait_for_inferior
hej
infrun: infwait_normal_state
infrun: TARGET_WAITKIND_STOPPED
infrun: stop_pc = 0x8048540
infrun: BPSTATE_WHAT_STOP_SILENT
infrun: stop_stepping
$1 = void
(gdb) c
Continuing.
infrun: proceed (addr=0xffffffff, signal=144, step=0)
infrun: resume (step=0, signal=0)
infrun: wait_for_inferior
^Cinfrun: infwait_normal_state
infrun: TARGET_WAITKIND_STOPPED
infrun: stop_pc = 0xbbb1ba87
infrun: random signal 2

Program received signal SIGINT, Interrupt.
infrun: stop_stepping
0xbbb1ba87 in select () from /usr/lib/libc.so.12
(gdb)




Home | Main Index | Thread Index | Old Index