[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-1-en-105":3,"doc-seo-571744-105":53,"doc-detail-571744-en":127},{"code":4,"msg":5,"data":6},0,"success",[7,14,19,24,29,34,39,44,49],{"id":8,"doc_module":9,"doc_module_name":10,"category_name":11,"show_sort_weight":12,"slug":13},11,1,"Template","Presentations",90,"presentations",{"id":15,"doc_module":9,"doc_module_name":10,"category_name":16,"show_sort_weight":17,"slug":18},12,"Resumes",80,"resumes",{"id":20,"doc_module":9,"doc_module_name":10,"category_name":21,"show_sort_weight":22,"slug":23},14,"Invoices",70,"invoices",{"id":25,"doc_module":9,"doc_module_name":10,"category_name":26,"show_sort_weight":27,"slug":28},15,"Posters",60,"posters",{"id":30,"doc_module":9,"doc_module_name":10,"category_name":31,"show_sort_weight":32,"slug":33},16,"Social Media",50,"social-media",{"id":35,"doc_module":9,"doc_module_name":10,"category_name":36,"show_sort_weight":37,"slug":38},17,"Forms",40,"forms",{"id":40,"doc_module":9,"doc_module_name":10,"category_name":41,"show_sort_weight":42,"slug":43},18,"Letters",30,"letters",{"id":45,"doc_module":9,"doc_module_name":10,"category_name":46,"show_sort_weight":47,"slug":48},21,"Paper Templates",5,"papers-templates",{"id":50,"doc_module":9,"doc_module_name":10,"category_name":51,"show_sort_weight":4,"slug":52},158,"General","general-158",{"code":4,"msg":54,"data":55},"ok",{"site_id":56,"language":57,"slug":58,"title":59,"keywords":60,"description":61,"schema_data":62,"social_meta":120,"head_meta":122,"extra_data":124,"updated_unix":126},105,"en","gdb-cheatsheet-reference","gdb Cheatsheet - Reference","","gdb Cheatsheet provides a compact, practical reference for debugging x86 programs and C applications using GNU Debugger. It introduces core command workflows such as setting and deleting breakpoints, adding breakpoint conditions in C syntax, loading executables, and controlling execution with run, continue, step, next, stepi, and nexti. The guide also covers inspecting program state via info subcommands (frame, stack, registers, breakpoints, functions), using stack trace with backtrace-style commands, quitting gdb, and enabling and switching TUI layouts for source-level debugging.",{"@graph":63,"@context":119},[64,80,102],{"@type":65,"itemListElement":66},"BreadcrumbList",[67,71,74,77],{"item":68,"name":69,"@type":70,"position":9},"https://docshare.wps.com","Home","ListItem",{"item":72,"name":10,"@type":70,"position":73},"https://docshare.wps.com/template/",2,{"item":75,"name":11,"@type":70,"position":76},"https://docshare.wps.com/template/presentations/",3,{"item":78,"name":59,"@type":70,"position":79},"https://docshare.wps.com/template/gdb-cheatsheet-reference/571744/",4,{"url":78,"name":59,"@type":81,"image":82,"author":87,"headline":59,"publisher":90,"fileFormat":93,"inLanguage":57,"description":61,"dateModified":94,"datePublished":95,"encodingFormat":93,"isAccessibleForFree":96,"interactionStatistic":97},"DigitalDocument",{"url":83,"@type":84,"width":85,"height":86},"https://docshare.wps.com/thumbnails/gdb-cheatsheet-reference/571744.png","ImageObject",442,249,{"name":88,"@type":89},"Cart","Person",{"url":68,"name":91,"@type":92},"DocShare","Organization","application/pdf","2026-10-20","2026-10-13",true,{"@type":98,"interactionType":99,"userInteractionCount":101},"InteractionCounter",{"@type":100},"ViewAction",6,{"@type":103,"mainEntity":104},"FAQPage",[105,111,115],{"name":106,"@type":107,"acceptedAnswer":108},"How do you set a breakpoint on a specific function, line, or instruction address in gdb?","Question",{"text":109,"@type":110},"Use break with a function name, a filename and line number, or an address form. You can also disassemble a function to find instruction addresses when source is unavailable.","Answer",{"name":112,"@type":107,"acceptedAnswer":113},"How can you make a breakpoint stop only under a condition?",{"text":114,"@type":110},"Use condition with a breakpoint number and write the condition in C syntax. The expression can reference variables and functions available in the breakpoint’s scope.",{"name":116,"@type":107,"acceptedAnswer":117},"Which commands help you step through code at source and instruction level?",{"text":118,"@type":110},"Use step to step into source lines and stepi to step a single x86 instruction. Use next to step over calls and nexti to step over instructions.","https://schema.org",{"og:url":78,"og:type":121,"og:title":59,"og:site_name":91,"og:description":61},"article",{"robots":123,"canonical":78},"index,follow",{"doc_id":125,"site_id":56},571744,1792242023,{"code":4,"msg":5,"data":128},{"doc_id":125,"user_id":129,"nickname":88,"user_avatar":130,"doc_module":9,"category_id":8,"category_name":11,"doc_title":59,"doc_description":61,"doc_content":131,"file_id":132,"file_url":133,"file_type":134,"file_size":135,"view_count":101,"is_deleted":4,"is_public":9,"is_downloadable":9,"audit_status":9,"page_count":101,"language":136,"language_code":57,"site_id":56,"html_lang":57,"table_of_contents":137,"faqs":138,"seo_title":139,"seo_description":61,"update_tm":140,"read_time":73},18829141979164,"https://eur-avatar.wpscdn.com/davatar_6f874abed73319feea01a86fa6f0fab8","CSCI0330 Intro Computer Systems Doeppner  \ngdb Cheatsheet  \nFall 2018  \n1 Introduction 1  \n2 Program Execution 1  \n3 TUI (Text User Interface) Mode 4  \n4 Viewing Variables, Registers and Memory 4  \n5 More Information 5  \n5.1 Oficial Documentation 6  \n5.2 Tutorials 6  \n6 Tips 6  \n1 Introduction  \nThis document contains several gdb commands which you will find useful throughout your x86-and C-programming career.  \nThe commands contained within this document are by no means exhaustive; gdb contains many features which are not documented here. Consult the man pages (man gdb) or the internet if you require further information.  \nThroughout this document, commands shall be listed in the form  \n[c ]ommand \u003C required arg> (optional arg) This is what the command does.  \nThis is an example use of this command.  \nwhere the character(s) in [brackets] are the abbreviated version of the command.  \n2 Program Execution  \n[b]reak \u003Cfunction name or filename : line\\# or *memory address>  \nSets a breakpoint on either a function, a line given by a line number, or the instruction located ata particular address.  \nIf you do not have access to the source code of a function and wish to set a breakpoint on a particular instruction, call disassemble function_name (where function_name is the name of the procedure) ; this command will allow you to see the memory address of each instruction. See section 4 for further information.  \nCSCI0330 gdb Cheatsheet Fall 2017  \n(gdb) break main  \nBreakpoint 1 at 0x80488f6 : file main .c , line 67 .  \n[d]elete \u003Cbreakpoint \\#>  \nRemoves the indicated breakpoint. To see breakpoint numbers, run info break, or i b.  \n(gdb) delete 4  \n[condition] \u003Cbreakpoint \\#> \u003Ccondition>  \nUpdates the breakpoint indicated by the given number so that execution of the program stops at that point only if condition is true. condition is expressed in C syntax, and can only use variables and functions that are available in the scope of the breakpoint location  \n(gdb) break main  \nBreakpoint 1 at 0x80488f6 : file main .c , line 48  \n(gdb) condition 1 argc \u003C= 2 || ! st rcmp(argv[1], \"jasmine \" )  \n[i]nfo (about)  \nLists information about the argument (about) , or lists what possible arguments are if none are provided.  \nabout can be one of the following1 :  \n● [f]rame – list information about the current stack frame, including the address of the current frame, the address of the previous frame, locations of saved registers, function arguments, and local variables.  \n● [ s ]tack – list the stack backtrace, showing what function calls have been made, and their arguments. You can also use the commands backtrace or where to do the same.  \n● [ r ]egisters –lists the contents of each register. [all-r]egisters lists even more registers.  \n● [b]reak – lists the number and address of each breakpoint, and what function the breakpoint is in.  \n● [fu ] nctions - lists all of the function signatures, if the program was compiled with the gcc flag-g. This is useful for setting breakpoints in functions.  \n[file ] \u003Cfilename of executable > Loads the specified file into gdb .  \n[ r ]un (arg1 arg2 . . . argn)  \nRuns the loaded executable program with program arguments arg1 . .. argn.  \n[c ]ontinue  \nResumes execution of a stopped program, stopping again at the next breakpoint.  \nCSCI0330 gdb Cheatsheet Fall 2017  \n[ s ]tep  \nSteps through a single line of code. Steps into function calls.  \n(gdb) break main  \nBreakpoint 1 at 0x8049377 : file main .c , line 34 .  \n(gdb) r  \nBreakpoint 1 , main (argc=2 , argv=0xbffff704) at main .c : 34  \n35 int val = foo(argv[1]);(gdb) s foo (word=0xbffff8b3) at main .c :11  \n12 char bar = word [0];  \n[ s ]tep[i]  \nSteps through a single x86 instruction. Steps into calls.  \n(gdb) 0x080484d5 in main ()  \n1 : x/i $pc  \n=> 0x80484d5 \u003Cmain + 113> : call 0x80484ec\u003Cdo_something>  \n(gdb) si  \n0x080484ec in do_something()  \n1 : x/i $pc  \n=> 0x80484ec \u003Cmain + 113> : push %ebp  \n[ n ]ext  \nSteps through a single line of code. Steps over func","cbCairZpsbptGPMH","https://ap.wps.com/l/cbCairZpsbptGPMH","pdf",255753,"English","# Introduction\n# Program Execution\n# TUI (Text User Interface) Mode\n## Viewing Variables, Registers and Memory","[{\"question\":\"How do you set a breakpoint on a specific function, line, or instruction address in gdb?\",\"answer\":\"Use break with a function name, a filename and line number, or an address form. You can also disassemble a function to find instruction addresses when source is unavailable.\"},{\"question\":\"How can you make a breakpoint stop only under a condition?\",\"answer\":\"Use condition with a breakpoint number and write the condition in C syntax. The expression can reference variables and functions available in the breakpoint’s scope.\"},{\"question\":\"Which commands help you step through code at source and instruction level?\",\"answer\":\"Use step to step into source lines and stepi to step a single x86 instruction. Use next to step over calls and nexti to step over instructions.\"}]","gdb Cheatsheet - Reference | PDF",1791923527]