In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
Editor to share with you how to use the Debug command in Shell, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!
After using the Target Server of Host to connect with the WDB Agent of Target, you can not only use the Debugger of Workbench for graphical online debugging, but also use gdb of Host Shell for command line debugging.
What if there is no Target Connection? In fact, VxWorks also provides a dbgLib-debugging facilities (INCLUDE_DEBUG)-> dbgHelpb Display breakpoints and eventpointsb addr [, task [, count [, quiet] Set breakpointbi [bpId] Display breakpoint (s) detailed informatione addr [, eventNo [, task [, func [, arg] Set eventpointdprintf addr] for special use in Shell. Task,count,fmtStr [, args] Set dynamic printf eventpointbd addr [, task] Delete breakpointbdall [task] Delete all breakpoints and eventpointsc [task [, addr [, addr1] Continue from breakpointcret [task] Continue to subroutine returns [task [, addr [ Addr1]] Single stepso [task] Single step/step over subroutinel [adr [, nInst]] List disassembled memorytt [task] Do stack trace on taskhdprintf addr,access,task,count,fmtStr [, args] Set hardware dynamic printf eventpoint (bh () help entry lists access modes) bh addr [, access [ Task [, count [, quiet] Set hardware breakpoint access: 0-instruction 1-write 1 byte 3-read/write 1 byte 5-write 2 bytes 7-read/write 2 bytes d-write 4 bytes f-read/write 4 bytes 9-write 8 bytes b-read/write 8 bytes
Write a little chestnut.
# include
Void eee () {printf ("!% s\ n", _ _ FUNCTION__);} void ddd () {printf ("!% s\ n", _ _ FUNCTION__); eee ();} void ccc () {printf ("!% s\ n", _ _ FUNCTION__); ddd ();} void bbb () {printf ("!% s\ n", _ _ FUNCTION__); ccc () } void aaa () {printf ("!% s\ n", _ _ FUNCTION__); bbb ();}
Use it to try the operation of this dbgLib
Add a breakpoint first, for example, at the location of bbb ()
Start the program from aaa (), and the new task will stop at bbb ()
Use tt () to take a look at the call stack and l () to take a look at the assembly code to be executed (though I don't understand it either)
Use dprintf () to add a dynamic event point, for example, at the location of ddd ()
Use c () to let the program execute to the next breakpoint or end
The above is all the contents of the article "how to use Debug commands in Shell". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.