* see automatically source @ 2011-07-06 20:52 Mohsen Pahlevanzadeh 2011-07-07 4:38 ` binary debugging and generate source of which that running Mohsen Pahlevanzadeh 2011-07-08 5:15 ` see automatically source Paul Pluzhnikov 0 siblings, 2 replies; 13+ messages in thread From: Mohsen Pahlevanzadeh @ 2011-07-06 20:52 UTC (permalink / raw) To: gdb [-- Attachment #1: Type: text/plain, Size: 283 bytes --] Dear all, I need to run a program, and When it perform an action, i see its source, because i had find out which function do the given action. So i need to tell to gdb that it generate automatically source that i can see immedialy source of that function. Yours, Mohsen [-- Attachment #2: This is a digitally signed message part --] [-- Type: application/pgp-signature, Size: 316 bytes --] ^ permalink raw reply [flat|nested] 13+ messages in thread
* binary debugging and generate source of which that running 2011-07-06 20:52 see automatically source Mohsen Pahlevanzadeh @ 2011-07-07 4:38 ` Mohsen Pahlevanzadeh 2011-07-07 7:20 ` harish badrinath 2011-07-08 5:15 ` see automatically source Paul Pluzhnikov 1 sibling, 1 reply; 13+ messages in thread From: Mohsen Pahlevanzadeh @ 2011-07-07 4:38 UTC (permalink / raw) To: gdb [-- Attachment #1: Type: text/plain, Size: 345 bytes --] Dear all, I have a binary file what i compile it with -g.So i need to perform a set of action in my computer and see behavior of my file, This mean , i need to see functions of run when i perform those set of actions, So i need to tell to gdb : Please print source of which peace of program that running. How i do it? Yours, Mohsen [-- Attachment #2: This is a digitally signed message part --] [-- Type: application/pgp-signature, Size: 316 bytes --] ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: binary debugging and generate source of which that running 2011-07-07 4:38 ` binary debugging and generate source of which that running Mohsen Pahlevanzadeh @ 2011-07-07 7:20 ` harish badrinath 2011-07-07 8:46 ` Mohsen Pahlevanzadeh 0 siblings, 1 reply; 13+ messages in thread From: harish badrinath @ 2011-07-07 7:20 UTC (permalink / raw) To: Mohsen Pahlevanzadeh; +Cc: gdb On Thu, Jul 7, 2011 at 10:08 AM, Mohsen Pahlevanzadeh <mohsen@pahlevanzadeh.org> wrote: > Dear all, > > I have a binary file what i compile it with -g.So i need to perform a > set of action in my computer and see behavior of my file, This mean , i > need to see functions of run when i perform those set of actions, So i > need to tell to gdb : Please print source of which peace of program that > running. > How i do it? You are using C ?? I don’t think you can assume you have read access to a file that you are trying to executing, apart from that why cant you just use GDB to do that whenever it is required. ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: binary debugging and generate source of which that running 2011-07-07 7:20 ` harish badrinath @ 2011-07-07 8:46 ` Mohsen Pahlevanzadeh 2011-07-07 8:48 ` harish badrinath 0 siblings, 1 reply; 13+ messages in thread From: Mohsen Pahlevanzadeh @ 2011-07-07 8:46 UTC (permalink / raw) To: harish badrinath; +Cc: gdb [-- Attachment #1: Type: text/plain, Size: 813 bytes --] Yes, i'm using C and compiled with -g.I'm and run: gdb myprog (gdb)run --mohsen On Thu, 2011-07-07 at 12:50 +0530, harish badrinath wrote: > On Thu, Jul 7, 2011 at 10:08 AM, Mohsen Pahlevanzadeh > <mohsen@pahlevanzadeh.org> wrote: > > Dear all, > > > > I have a binary file what i compile it with -g.So i need to perform a > > set of action in my computer and see behavior of my file, This mean , i > > need to see functions of run when i perform those set of actions, So i > > need to tell to gdb : Please print source of which peace of program that > > running. > > How i do it? > > You are using C ?? > I don’t think you can assume you have read access to a file that you > are trying to executing, > apart from that why cant you just use GDB to do that whenever it is required. [-- Attachment #2: This is a digitally signed message part --] [-- Type: application/pgp-signature, Size: 316 bytes --] ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: binary debugging and generate source of which that running 2011-07-07 8:46 ` Mohsen Pahlevanzadeh @ 2011-07-07 8:48 ` harish badrinath 2011-07-07 9:15 ` Mohsen Pahlevanzadeh 0 siblings, 1 reply; 13+ messages in thread From: harish badrinath @ 2011-07-07 8:48 UTC (permalink / raw) To: Mohsen Pahlevanzadeh; +Cc: gdb Are you talking about Printing source lines (http://sunsite.ualberta.ca/Documentation/Gnu/gdb-4.18/html_chapter/gdb_8.html ) ?? ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: binary debugging and generate source of which that running 2011-07-07 8:48 ` harish badrinath @ 2011-07-07 9:15 ` Mohsen Pahlevanzadeh 2011-07-07 9:23 ` Jan Kratochvil 2011-07-07 12:33 ` Andrew Burgess 0 siblings, 2 replies; 13+ messages in thread From: Mohsen Pahlevanzadeh @ 2011-07-07 9:15 UTC (permalink / raw) To: harish badrinath; +Cc: gdb [-- Attachment #1: Type: text/plain, Size: 461 bytes --] You suppose my program has 10 functions, and my program in running now by gdb, i wanna know when i send signal x y z to my program, myprgram call which function, So i need to a command same as list but immediately print source of peace of running. --mohsen On Thu, 2011-07-07 at 14:18 +0530, harish badrinath wrote: > Are you talking about Printing source lines > (http://sunsite.ualberta.ca/Documentation/Gnu/gdb-4.18/html_chapter/gdb_8.html > ) ?? [-- Attachment #2: This is a digitally signed message part --] [-- Type: application/pgp-signature, Size: 316 bytes --] ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: binary debugging and generate source of which that running 2011-07-07 9:15 ` Mohsen Pahlevanzadeh @ 2011-07-07 9:23 ` Jan Kratochvil 2011-07-07 9:29 ` Mohsen Pahlevanzadeh 2011-07-07 12:33 ` Andrew Burgess 1 sibling, 1 reply; 13+ messages in thread From: Jan Kratochvil @ 2011-07-07 9:23 UTC (permalink / raw) To: Mohsen Pahlevanzadeh; +Cc: harish badrinath, gdb On Thu, 07 Jul 2011 11:14:29 +0200, Mohsen Pahlevanzadeh wrote: > You suppose my program has 10 functions, and my program in running now > by gdb, i wanna know when i send signal x y z to my program, myprgram > call which function, So i need to a command same as list but immediately > print source of peace of running. Do you mean command `backtrace'? Jan ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: binary debugging and generate source of which that running 2011-07-07 9:23 ` Jan Kratochvil @ 2011-07-07 9:29 ` Mohsen Pahlevanzadeh 0 siblings, 0 replies; 13+ messages in thread From: Mohsen Pahlevanzadeh @ 2011-07-07 9:29 UTC (permalink / raw) To: Jan Kratochvil; +Cc: harish badrinath, gdb [-- Attachment #1: Type: text/plain, Size: 502 bytes --] Can i see executed code with bt command? --mohsen On Thu, 2011-07-07 at 11:23 +0200, Jan Kratochvil wrote: > On Thu, 07 Jul 2011 11:14:29 +0200, Mohsen Pahlevanzadeh wrote: > > You suppose my program has 10 functions, and my program in running now > > by gdb, i wanna know when i send signal x y z to my program, myprgram > > call which function, So i need to a command same as list but immediately > > print source of peace of running. > > Do you mean command `backtrace'? > > > Jan [-- Attachment #2: This is a digitally signed message part --] [-- Type: application/pgp-signature, Size: 316 bytes --] ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: binary debugging and generate source of which that running 2011-07-07 9:15 ` Mohsen Pahlevanzadeh 2011-07-07 9:23 ` Jan Kratochvil @ 2011-07-07 12:33 ` Andrew Burgess 2011-07-07 13:47 ` Markus Duft 2011-07-07 15:26 ` Mohsen Pahlevanzadeh 1 sibling, 2 replies; 13+ messages in thread From: Andrew Burgess @ 2011-07-07 12:33 UTC (permalink / raw) To: gdb On 07/07/2011 10:14, Mohsen Pahlevanzadeh wrote: > You suppose my program has 10 functions, and my program in running now > by gdb, i wanna know when i send signal x y z to my program, myprgram > call which function, So i need to a command same as list but immediately > print source of peace of running. Maybe "handle" is what you want? http://sourceware.org/gdb/current/onlinedocs/gdb/Signals.html#Signals You can arrange to stop on each signal x, y, and z, then step into the handlers for each as they arrive. Andrew ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: binary debugging and generate source of which that running 2011-07-07 12:33 ` Andrew Burgess @ 2011-07-07 13:47 ` Markus Duft 2011-07-07 15:24 ` Mohsen Pahlevanzadeh 2011-07-07 15:26 ` Mohsen Pahlevanzadeh 1 sibling, 1 reply; 13+ messages in thread From: Markus Duft @ 2011-07-07 13:47 UTC (permalink / raw) To: gdb On 07/07/11 14:32, Andrew Burgess wrote: > On 07/07/2011 10:14, Mohsen Pahlevanzadeh wrote: >> You suppose my program has 10 functions, and my program in running now >> by gdb, i wanna know when i send signal x y z to my program, myprgram >> call which function, So i need to a command same as list but immediately >> print source of peace of running. > > Maybe "handle" is what you want? > http://sourceware.org/gdb/current/onlinedocs/gdb/Signals.html#Signals > > You can arrange to stop on each signal x, y, and z, then step into the handlers for each as they arrive. As i understood it, he wants to be able to see whats happening as the program executes normally, much like a strace or truss, but printing the according source information. is this correct? Markus > > Andrew > ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: binary debugging and generate source of which that running 2011-07-07 13:47 ` Markus Duft @ 2011-07-07 15:24 ` Mohsen Pahlevanzadeh 0 siblings, 0 replies; 13+ messages in thread From: Mohsen Pahlevanzadeh @ 2011-07-07 15:24 UTC (permalink / raw) To: Markus Duft; +Cc: gdb [-- Attachment #1: Type: text/plain, Size: 1104 bytes --] Yes, Of course,For instance, if your program run function myfunc() agains signal OOO, i can see source of myfunc and name of myfunc(), of course, name of function is very important. --mohsen On Thu, 2011-07-07 at 15:47 +0200, Markus Duft wrote: > On 07/07/11 14:32, Andrew Burgess wrote: > > On 07/07/2011 10:14, Mohsen Pahlevanzadeh wrote: > >> You suppose my program has 10 functions, and my program in running now > >> by gdb, i wanna know when i send signal x y z to my program, myprgram > >> call which function, So i need to a command same as list but immediately > >> print source of peace of running. > > > > Maybe "handle" is what you want? > > http://sourceware.org/gdb/current/onlinedocs/gdb/Signals.html#Signals > > > > You can arrange to stop on each signal x, y, and z, then step into the handlers for each as they arrive. > > As i understood it, he wants to be able to see whats happening as the program executes normally, much like a strace or truss, but printing the according source information. is this correct? > > Markus > > > > > Andrew > > > [-- Attachment #2: This is a digitally signed message part --] [-- Type: application/pgp-signature, Size: 316 bytes --] ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: binary debugging and generate source of which that running 2011-07-07 12:33 ` Andrew Burgess 2011-07-07 13:47 ` Markus Duft @ 2011-07-07 15:26 ` Mohsen Pahlevanzadeh 1 sibling, 0 replies; 13+ messages in thread From: Mohsen Pahlevanzadeh @ 2011-07-07 15:26 UTC (permalink / raw) To: Andrew Burgess; +Cc: gdb [-- Attachment #1: Type: text/plain, Size: 751 bytes --] Dear Andrew Please attention to previous email...My mean is not SIG...signal is a message that user emit it. --mohsen On Thu, 2011-07-07 at 13:32 +0100, Andrew Burgess wrote: > On 07/07/2011 10:14, Mohsen Pahlevanzadeh wrote: > > You suppose my program has 10 functions, and my program in running now > > by gdb, i wanna know when i send signal x y z to my program, myprgram > > call which function, So i need to a command same as list but immediately > > print source of peace of running. > > Maybe "handle" is what you want? > http://sourceware.org/gdb/current/onlinedocs/gdb/Signals.html#Signals > > You can arrange to stop on each signal x, y, and z, then step into the > handlers for each as they arrive. > > Andrew > [-- Attachment #2: This is a digitally signed message part --] [-- Type: application/pgp-signature, Size: 316 bytes --] ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: see automatically source 2011-07-06 20:52 see automatically source Mohsen Pahlevanzadeh 2011-07-07 4:38 ` binary debugging and generate source of which that running Mohsen Pahlevanzadeh @ 2011-07-08 5:15 ` Paul Pluzhnikov 1 sibling, 0 replies; 13+ messages in thread From: Paul Pluzhnikov @ 2011-07-08 5:15 UTC (permalink / raw) To: Mohsen Pahlevanzadeh; +Cc: gdb On Wed, Jul 6, 2011 at 1:51 PM, Mohsen Pahlevanzadeh <mohsen@pahlevanzadeh.org> wrote: > I need to run a program, and When it perform an action, i see its > source, because i had find out which function do the given action. > So i need to tell to gdb that it generate automatically source that i > can see immedialy source of that function. Your question make absolutely no sense (to me). Can you try to ask it in a more concrete, or a different fashion? Cheers, -- Paul Pluzhnikov ^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2011-07-08 5:15 UTC | newest] Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2011-07-06 20:52 see automatically source Mohsen Pahlevanzadeh 2011-07-07 4:38 ` binary debugging and generate source of which that running Mohsen Pahlevanzadeh 2011-07-07 7:20 ` harish badrinath 2011-07-07 8:46 ` Mohsen Pahlevanzadeh 2011-07-07 8:48 ` harish badrinath 2011-07-07 9:15 ` Mohsen Pahlevanzadeh 2011-07-07 9:23 ` Jan Kratochvil 2011-07-07 9:29 ` Mohsen Pahlevanzadeh 2011-07-07 12:33 ` Andrew Burgess 2011-07-07 13:47 ` Markus Duft 2011-07-07 15:24 ` Mohsen Pahlevanzadeh 2011-07-07 15:26 ` Mohsen Pahlevanzadeh 2011-07-08 5:15 ` see automatically source Paul Pluzhnikov
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox