Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

GDB Quick Reference: Essential Commands and Functions, Study notes of Computer Systems Networking and Telecommunications

A quick reference for essential gdb (gnu debugger) commands and functions. Gdb is a powerful debugging tool used for debugging c, c++, and other programming languages. Essential commands for starting gdb, setting breakpoints, running and debugging programs, displaying values, and using shell commands.

Typology: Study notes

Pre 2010

Uploaded on 08/05/2009

koofers-user-wvb-1
koofers-user-wvb-1 🇺🇸

10 documents

1 / 2

Toggle sidebar

Related documents


Partial preview of the text

Download GDB Quick Reference: Essential Commands and Functions and more Study notes Computer Systems Networking and Telecommunications in PDF only on Docsity! G D B Q U IC K R E F E R E N C E G D B V er si on 4 E ss en ti al C om m an ds g d b pr og ra m [c or e] de bu g pr og ra m [u si ng co re du m p co re ] b [fi le : ]f un ct io n se t br ea kp oi nt at fu nc ti on [i n fil e] r u n [a rg li st ] st ar t yo ur pr og ra m [w ith ar gl is t] b t ba ck tr ac e: di sp la y pr og ra m st ac k p ex pr di sp la y th e va lu e of an ex pr es si on c co nt in ue ru nn in g yo ur pr og ra m n ne xt lin e, st ep pi ng ov er fu nc tio n ca lls s ne xt lin e, st ep pi ng in to fu nc tio n ca lls St ar ti ng G D B g d b st ar t G D B , w ith no de bu gg in g fil es g d b pr og ra m be gi n de bu gg in g pr og ra m g d b pr og ra m co re de bu g co re du m p co re pr od uc ed by pr og ra m g d b - - h e l p de sc ri be co m m an d lin e op tio ns St op pi ng G D B q u i t ex it G D B ; al so q or E O F (e g C - d ) I N T E R R U P T (e g C - c ) te rm in at e cu rr en t co m m an d, or se nd to ru nn in g pr oc es s G et ti ng H el p h e l p lis t cl as se s of co m m an ds h e l p cl as s on e- lin e de sc ri pt io ns fo r co m m an ds in cl as s h e l p co m m an d de sc ri be co m m an d E xe cu ti ng yo ur P ro gr am r u n ar gl is t st ar t yo ur pr og ra m w ith ar gl is t r u n st ar t yo ur pr og ra m w ith cu rr en t ar gu m en t lis t r u n < in f > ou tf st ar t yo ur pr og ra m w ith in pu t, ou tp ut re di re ct ed k i l l ki ll ru nn in g pr og ra m t t y de v us e de v as st di n an d st do ut fo r ne xt r u n s e t a r g s ar gl is t sp ec if y ar gl is t fo r ne xt r u n s e t a r g s sp ec if y em pt y ar gu m en t lis t s h o w a r g s di sp la y ar gu m en t lis t s h o w e n v i r o n m e n t sh ow al l en vi ro nm en t va ri ab le s s h o w e n v va r sh ow va lu e of en vi ro nm en t va ri ab le va r s e t e n v va r st ri ng se t en vi ro nm en t va ri ab le va r u n s e t e n v va r re m ov e va r fr om en vi ro nm en t Sh el l C om m an ds c d di r ch an ge w or ki ng di re ct or y to di r p w d Pr in t w or ki ng di re ct or y m a k e ca ll “m a k e ” s h e l l cm d ex ec ut e ar bi tr ar y sh el l co m m an d st ri ng [ ] su rr ou nd op tio na l ar gu m en ts sh ow on e or m or e ar gu m en ts  19 91 , 19 92 Fr ee So ft w ar e Fo un da tio n, In c. Pe rm is si on s on ba ck B re ak po in ts an d W at ch po in ts b r e a k [fi le : ]l in e b [fi le : ]l in e se t br ea kp oi nt at li ne nu m be r [i n fil e] eg : b r e a k m a i n . c : 3 7 b r e a k [fi le : ]f un ct io n se t br ea kp oi nt at fu nc ti on [i n fil e] b r e a k + of fs et b r e a k - of fs et se t br ea k at of fs et lin es fr om cu rr en t st op b r e a k * ad dr se t br ea kp oi nt at ad dr es s ad dr b r e a k se t br ea kp oi nt at ne xt in st ru ct io n b r e a k i f ex pr br ea k co nd iti on al ly on no nz er o ex pr c o n d n [e xp r] ne w co nd iti on al ex pr es si on on br ea kp oi nt n; m ak e un co nd iti on al if no ex pr t b r e a k te m po ra ry br ea k; di sa bl e w he n re ac he d r b r e a k re ge x br ea k on al l fu nc tio ns m at ch in g re ge x w a t c h ex pr se t a w at ch po in t fo r ex pr es si on ex pr c a t c h x br ea k at C + + ha nd le r fo r ex ce pt io n x i n f o b r e a k sh ow de fin ed br ea kp oi nt s i n f o w a t c h sh ow de fin ed w at ch po in ts c l e a r de le te br ea kp oi nt s at ne xt in st ru ct io n c l e a r [fi le : ]f un de le te br ea kp oi nt s at en tr y to fu n( ) c l e a r [fi le : ]l in e de le te br ea kp oi nt s on so ur ce lin e d e l e t e [n ] de le te br ea kp oi nt s [o r br ea kp oi nt n] d i s a b l e [n ] di sa bl e br ea kp oi nt s [o r br ea kp oi nt n] e n a b l e [n ] en ab le br ea kp oi nt s [o r br ea kp oi nt n] e n a b l e o n c e [n ] en ab le br ea kp oi nt s [o r br ea kp oi nt n] ; di sa bl e ag ai n w he n re ac he d e n a b l e d e l [n ] en ab le br ea kp oi nt s [o r br ea kp oi nt n] ; de le te w he n re ac he d i g n o r e n co un t ig no re br ea kp oi nt n, co un t tim es c o m m a n d s n [s i l e n t ] co m m an d- li st ex ec ut e G D B co m m an d- li st ev er y tim e br ea kp oi nt n is re ac he d. [s i l e n t su pp re ss es de fa ul t di sp la y] e n d en d of co m m an d- li st P ro gr am St ac k b a c k t r a c e [n ] b t [n ] pr in t tr ac e of al l fr am es in st ac k; or of n fr am es — in ne rm os t if n> 0 , ou te rm os t if n< 0 f r a m e [n ] se le ct fr am e nu m be r n or fr am e at ad dr es s n; if no n, di sp la y cu rr en t fr am e u p n se le ct fr am e n fr am es up d o w n n se le ct fr am e n fr am es do w n i n f o f r a m e [a dd r] de sc ri be se le ct ed fr am e, or fr am e at ad dr i n f o a r g s ar gu m en ts of se le ct ed fr am e i n f o l o c a l s lo ca l va ri ab le s of se le ct ed fr am e i n f o r e g [r n] i n f o a l l - r e g [r n] re gi st er va lu es [f or re g rn ] in se le ct ed fr am e; a l l - r e g in cl ud es flo at in g po in t i n f o c a t c h ex ce pt io n ha nd le rs ac tiv e in se le ct ed fr am e E xe cu ti on C on tr ol c o n t i n u e [c ou nt ] c [c ou nt ] co nt in ue ru nn in g; if co un t sp ec ifi ed , ig no re th is br ea kp oi nt ne xt co un t tim es s t e p [c ou nt ] s [c ou nt ] ex ec ut e un til an ot he r lin e re ac he d; re pe at co un t tim es if sp ec ifi ed s t e p i [c ou nt ] s i [c ou nt ] st ep by m ac hi ne in st ru ct io ns ra th er th an so ur ce lin es n e x t [c ou nt ] n [c ou nt ] ex ec ut e ne xt lin e, in cl ud in g an y fu nc tio n ca lls n e x t i [c ou nt ] n i [c ou nt ] ne xt m ac hi ne in st ru ct io n ra th er th an so ur ce lin e u n t i l [l oc at io n] ru n un til ne xt in st ru ct io n (o r lo ca ti on ) f i n i s h ru n un til se le ct ed st ac k fr am e re tu rn s r e t u r n [e xp r] po p se le ct ed st ac k fr am e w ith ou t ex ec ut in g [s et tin g re tu rn va lu e] s i g n a l nu m re su m e ex ec ut io n w ith si gn al s (n on e if 0 ) j u m p li ne j u m p * ad dr es s re su m e ex ec ut io n at sp ec ifi ed li ne nu m be r or ad dr es s s e t v a r = ex pr ev al ua te ex pr w ith ou t di sp la yi ng it; us e fo r al te ri ng pr og ra m va ri ab le s D is pl ay p r i n t [/ f] [e xp r] p [/ f] [e xp r] sh ow va lu e of ex pr [o r la st va lu e $ ] ac co rd in g to fo rm at f: x he xa de ci m al d si gn ed de ci m al u un si gn ed de ci m al o oc ta l t bi na ry a ad dr es s, ab so lu te an d re la tiv e c ch ar ac te r f flo at in g po in t c a l l [/ f] ex pr lik e p r i n t bu t do es no t di sp la y v o i d x [/ N uf ] ex pr ex am in e m em or y at ad dr es s ex pr ; op tio na l fo rm at sp ec fo llo w s sl as h N co un t of ho w m an y un its to di sp la y u un it si ze ; on e of b in di vi du al by te s h ha lf w or ds (t w o by te s) w w or ds (f ou r by te s) g gi an t w or ds (e ig ht by te s) f pr in tin g fo rm at . A ny p r i n t fo rm at , or s nu ll- te rm in at ed st ri ng i m ac hi ne in st ru ct io ns d i s a s s e m [a dd r] di sp la y m em or y as m ac hi ne in st ru ct io ns A ut om at ic D is pl ay d i s p l a y [/ f] ex pr sh ow va lu e of ex pr ea ch tim e pr og ra m st op s [a cc or di ng to fo rm at f] d i s p l a y di sp la y al l en ab le d ex pr es si on s on lis t u n d i s p l a y n re m ov e nu m be r( s) n fr om lis t of au to m at ic al ly di sp la ye d ex pr es si on s d i s a b l e d i s p n di sa bl e di sp la y fo r ex pr es si on (s ) nu m be r n e n a b l e d i s p n en ab le di sp la y fo r ex pr es si on (s ) nu m be r n i n f o d i s p l a y nu m be re d lis t of di sp la y ex pr es si on s
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved