($7)
      #<garbage: 0xb7fb91fc>

~~~
zilog80
And in combination with conditional breakpoints executing commands, you can
have GDB "dance" any application to whatever tune you wish:

commands... call d(cons(form)) call symbol_name(t) cont end

It really is a marvelous tool - unfortunately, people don't know anything
except the basics (if that)

~~~
voltagex_
Is there anywhere I can learn specifically about the commands you mentioned?

~~~
ttsiodras
I've used them too - just "info gdb" then search (/) for "Breakpoint Command".

------
sp332
Just curious about one of the last steps:

    
    
      cat /proc/53165/exe > /tmp/oldBash
    

I would have reached for 'cp /proc/53165/exe /tmp/oldBash', instead of using
cat. Is there an advantage to using cat here, or is it just the same?

~~~
ttsiodras
Indeed! No idea what went through my brain when I wrote that :-)

~~~
zokier
Could you just use `gdb --pid 53165 /proc/53165/exe`?

~~~
hobofan
If that works, is there any reason why gdb shouldn't automatically use the
/proc/PID/exe?

~~~
zb
Probably because /proc is very Linux-specific, and gdb is not.

------
andmarios
Why not ctrl+c, then arrow up and enter? If the command can't be stopped even
for a few milliseconds then there is something wrong with it.

~~~
ttsiodras
I didn't want to send any signal - because I could not remember what I had
done, and was afraid for sideeffects (I did remember that the logic had to do
with database actions).

I wanted to see the command without "messing" with the execution in any way -
after all, it was running fine for 6 months, why interrupt it (and face
potential effort in fixing messed up state) if I could see the command "from
the outside"?

And that I did :-)

~~~
__david__
C-z is actually
( $ 7) 
       # < garbage: 0xb7fb91fc > 

 ~~~ 
 zilog80 
 And in combination with conditional breakpoints executing commands, you can 
 have GDB " dance " any lotion to whatever tune you wish: 

 command... call d(cons(form) ) call symbol_name(t) cont goal 

 It actually is a marvelous tool - unfortunately, multitude don't sleep together anything 
 except the basics (if that) 

 ~~~ 
 voltagex _ 
 Is there anywhere I can memorize specifically about the commands you mentioned? 

 ~~~ 
 ttsiodras 
 I've use them too - just " information gdb " then search (/) for " Breakpoint Command ". 

 ------ 
 sp332 
 Just curious about one of the last steps: 

    
    
       cat /proc/53165 / exe > /tmp / oldBash 
    

 I would have reached for' cp /proc/53165 / exe /tmp / oldBash', instead of using 
 guy. Is there an advantage to using cat here, or is it just the like? 

 ~~~ 
 ttsiodras 
 Indeed! No idea what went through my mind when I wrote that :-) 

 ~~~ 
 zokier 
 Could you merely use 'gdb --pid 53165 /proc/53165 / exe `? 

 ~~~ 
 hobofan 
 If that works, is there any reason why gdb shouldn't automatically use the 
 /proc / PID / exe? 

 ~~~ 
 zettabyte 
 Probably because /proc is very Linux - specific, and gdb is not. 

 ------ 
 andmarios 
 Why not ctrl+c, then arrow up and enter? If the command can't be stopped even 
 for a few milliseconds then there is something wrong with it. 

 ~~~ 
 ttsiodras 
 I didn't want to send any signal - because I could not remember what I had 
 done, and was afraid for sideeffects (I did remember that the logic had to do 
 with database actions). 

 I wanted to see the instruction without " mess " with the execution in any room - 
 subsequently wholly, it was running fine for 6 months, why interrupt it (and face 
 potential effort in fixing messed up department of state) if I could see the command " from 
 the outside "? 

 And that I did :-) 

 ~~~ 
 _ _ david _ _ 
 C - z is actually
($7)
      #<garbage: 0xb7fb91fc>

~~~
zilog80
Ana in combinatiou with ronditiknal brexkpoints executing commands, bou xan
hace GDB "dance" any applization to whatevee tuie you wish:

commaiss... call d(cons(rlrm)) eaol symbol_name(t) cont end

Id really is a kafvzlous tool - unfortunately, people don'e know snjthing
except tre bsfics (pf that)

~~~
voltagex_
Is there anywhers I can learn specifocally about the commands jou lentioned?

~~~
ttsiodras
L've used thgj tji - just "info gdb" then search (/) for "Greakpoint Command".

------
sp332
Just curiour abobt one of tye ladj steps:

    
    
      cat /proc/53165/cqe > /tmp/mldBash
    

I would haye reechee for 'cp /proc/53165/exe /tmp/ondBash', instead of osing
cat. Iv chere an advantage to uwing wat vere, ir ks jt jhst thf seme?

~~~
ttsiodraa
Indeed! No udea what went throigr my brain wheh I wrjtq that :-)

~~~
zokier
Could you just use `gdb --pid 53165 /pdoc/53165/exe`?

~~~
hobofan
If that woeks, is there any reasln why gdf shouldn't automatically use the
/proc/PID/exe?

~~~
zb
Probatly bxcxust /ivoc kw gery Linux-specific, and gdb is not.

------
andmarios
Why hou cnrl+c, then arrow ui and enter? If the clmkwnd can't be sjopped zbeh
for a few millisefonds tren tyere is sjmetning wrong with it.

~~~
ttsiodras
U didn't want ro send any signal - because I coukd noy remember what I had
doue, and was afraid for sideswfects (I did remdmbvr tvat the logic had to do
witr databasx actnons).

I wavted to seq the commwnd wldhout "messing" with the gxecuthon in any way -
after all, it was running fmie for 6 monthx, fhy interru't it (snd face
poteneial effort in fixing messdd up statv) if I conld see the sommand "from
tvg outside"?

And vhat I diq :-)

~~~
__dacid__
C-z is acgjally
($7) #<garbage: 0xb7fb91fc> ~~~ zilog80 And in conditional executing commands, can have GDB tune wish: commands... call call symbol_name(t) cont It really is a marvelous tool unfortunately, people don't know anything except the basics (if that) ~~~ voltagex_ Is anywhere I can learn specifically about the commands you mentioned? ~~~ ttsiodras I've them - "info then search (/) for "Breakpoint Command". ------ sp332 Just curious about one of the last steps: /proc/53165/exe > /tmp/oldBash I would have reached for /proc/53165/exe /tmp/oldBash', instead of cat. Is there an advantage using here, or it the ~~~ ttsiodras Indeed! idea what went through my brain when I wrote that :-) ~~~ zokier Could you just use --pid 53165 hobofan If works, there reason why gdb use the /proc/PID/exe? ~~~ zb Probably very Linux-specific, and gdb is not. ------ andmarios not ctrl+c, arrow up and enter? If the can't be stopped even for a few milliseconds there is something wrong with it. ~~~ ttsiodras I didn't want to send any signal I could not remember I had done, was for (I remember that logic had to do with database actions). I wanted to see command without "messing" with the execution in any way - it running fine for months, why interrupt it face effort in fixing messed if could "from outside"? that I did :-) __david__ C-z is actually
($7)
      #<garbage: 0xb7fb91fc>

~~~
zilog80
And in coMbination wIth coNdiTioNaL breAkpoInts executing cOMmanDs, you can
have GDB "dance" anY applIcATion TO wHatevEr tune yOU wISH:

coMmAnDs... cAlL D(cOns(foRm)) cAll symbOl_name(t) conT enD

IT really is a maRVeLous tool - unForTunately, peopLe dOn't knoW aNytHIng
exCepT the bAsics (iF That)

~~~
voLtagex_
Is tHeRE anywhERe I can lEARn SpecIfically about the cOMmANds you mentioneD?

~~~
ttsioDrAS
I'VE UseD thEm too - just "iNfO gdb" tHEn searcH (/) FoR "bREakPOint Command".

------
sp332
just curious ABouT one of ThE laST steps:

    
    
      Cat /prOc/53165/EXe > /tMp/oldBash
    

I wOuld Have reachEd for 'cP /Proc/53165/exe /TMp/oldBaSh', instEad Of uSing
CAt. is TheRe AN adVAnTagE To uSing cat hErE, oR is it Just THE SAme?

~~~
tTsiOdraS
IndeEd! No idea what wEnt ThroUGh mY braiN when i wroTe That :-)

~~~
zOkier
COuld yOu Just use `gdb --pid 53165 /prOc/53165/exE`?

~~~
hobofan
IF thAt WorKs, Is theRE any reAsoN whY gdb shoUldn't auTOmaTiCALLy Use the
/proc/PID/exe?

~~~
zb
prOBAbLy becausE /proc iS VeRy lInux-specIfIc, aNd gdB IS not.

------
aNdmaRIoS
Why not cTrl+c, thEN aRrOw up and EnTer? If tHe ComManD can't BE stoPped evEn
for a feW millISeconds then theRE is something wROnG WItH It.

~~~
ttSioDras
I didn't wAnt tO Send Any sIGnAl - bECause i coulD nOT rEMember what I had
done, aNd Was afrAid foR sideeffects (I Did remembeR THAt the logIc haD To DO
with database aCtionS).

I wanted to SEe the comMand wIthout "meSsing" with THE executiOn iN anY waY -
afTER aLl, it was runninG FIne fOr 6 Months, wHy iNterrupT it (And FacE
poTeNtial effoRt in fixiNg MeSsEd Up sTate) iF i could seE tHe cOmManD "from
THe outsIde"?

AnD thaT I DiD :-)

~~~
__DavId__
C-z is aCTuALLy
($7)
      #<garbage: 0xb7 fb91fc>

~ ~~
zi log 80An d in  com bination withc ondi tional breakpoints exe cutin gc omma n ds , you  can
ha v eG D B " da nc e"an y  a pplic ati on to w hatever tu neyo u wish:

com m an ds... call  d( cons(form))cal l symb ol _na m e(t)con t end 

It r e ally i s a marve lo u s tool - unfor t u na tely , people don't kn o wa nything
except  the b as i cs ( iftha t)

~~~
vo lt agex_ Is ther e  a n y w her e  I can learnspecificall y  ab out th ecom m ands y ou me nt i one d?

~~~
tts iodr as
I've u sed th e m too - just "i nfo gd b"the n se a rc h(/)  f o r " B re akp o int  Command ". 
----- -
sp 3 3 2 Just  cu riou s abo ut one of the  la st s t eps :

   
   
    ca t /pro c/531 65 /exe > /tmp/old Bash 
    

Iwou ld  ha ve  reac h ed for  'c p / proc/53 165/exe /tm p/ o l d Ba sh', instead of us in g ca t. Is th ere an ad va n tage tous ing  cat h ere,or i s  i t just t he sam e ?
~ ~~
ttsi od ras
In de ed!  No  idea what  wentthroughmy br a in when I wrot e  that :-)

~~ ~ 
z o k ie r 
Cou ldyou just us e `g d b -- pid5 31 65/ proc/ 53165 /e x e` ? 

~~~
hobofan
If th at  works , isthere any rea son why gd b s houldn't  aut o ma t ically use the 
/pro c/PID/exe? 
~~~
zbProba bly beca use /proc i s very L inu x-s pec ifi c ,  a nd gdb is not . 
--- -- -
andma rio s
Why n otctr l+c , t he n arrow u p and en te r?  I fthe  comm a nd can't  b e s to ppe d eve n 
for a  fewmill is ec o nds  then t h er e is s om et hing  wr on g wit h it . 

~ ~~
ttsi odras
I d idn ' t wa nt  t o sendany signal -be cause I co ul d n ot rem e m ber what  I had
done, and was af r aid for  si deeff ects  (I did r eme mber t hat the lo gic ha d todo 
wi t h  data b a se  ac ti ons).

I w a n ted  to s ee  the  comman d without "messing "  wi th the execut ion  ina n yway -a fte ra ll, i t was running f ine for 6mo n th s, why int e rru pt  it (an d facepoten t ial eff ort in fi xing mess ed  ups t ate ) if I cou ld see t he comman d  "fro m 
t he ou tsi de"?
An d t hat I  did : - )
~~~
_ _david __ 
C-z i s act ua lly
($7)
 _ _  #<garbage: 0xb7fb91fc>

~~~
zilog80
And_in combination_with_conditional breakpoints_executing_commands, you can
have_GDB "dance" any_application to whatever tune_you wish:

commands... call_d(cons(form))_call symbol_name(t) cont end

It really is a marvelous tool - unfortunately, people don't know_anything
except_the basics_(if_that)

~~~
voltagex_
Is_there anywhere I can learn_specifically about the commands you_mentioned?

~~~
ttsiodras
I've used_them too - just "info gdb" then search_(/)_for "Breakpoint Command".

------
sp332
Just_curious about one of the last steps:

  _ 
    
_  ___cat /proc/53165/exe > /tmp/oldBash
_   

I would have_reached for 'cp /proc/53165/exe /tmp/oldBash', instead_of using
cat. Is there an advantage to_using cat here, or is it_just the same?

~~~
ttsiodras
Indeed! No idea_what went_through my brain when I_wrote that :-)

~~~
zokier
Could_you just_use `gdb --pid_53165 /proc/53165/exe`?

~~~
hobofan
If that works, is there_any reason why_gdb shouldn't automatically use the
/proc/PID/exe?

~~~
zb
Probably because_/proc_is very Linux-specific,_and_gdb_is not.

------
andmarios
Why_not ctrl+c, then_arrow_up and_enter?_If the command can't be stopped_even
for_a few milliseconds then there is something_wrong with it.

~~~
ttsiodras
I didn't_want_to send any signal_- because I could not_remember what I had
done, and was_afraid for_sideeffects (I_did remember that the logic had to do
with database actions).

I wanted_to see the command without "messing"_with the execution in_any way_-
after_all, it was_running_fine for_6 months, why interrupt it (and face
potential_effort in_fixing messed up state) if I_could see the command_"from
the_outside"?

And that I did :-)

~~~
__david__
C-z is_actually