简体   繁体   中英

Debugging using emacs

GNU Emacs 23.2.1 GCC 4.4.4

I am using gdb-many-windows to debug.

I am just wondering is there anything better?

At the moment I am debugging a linked-list. The list is not that big. However, it would be nice to see all the elements' values. Instead of having to 'print sorted_queue->next->seconds' all the time.

The watch command works ok, if a value changes. However, sometimes its nice to see all the values you want to watch in a separate buffer for easy review.

Everytime I what to see what a value is I have to issue the command print (p) and the name of the variable. Just a lot of typing. One thing Visual Studio is good for is debugging. It would be nice to see Emacs with some of those features.

Many thanks for any advice,

As far as dumping of the data structures is concerned, GDB Python extensions might interest you. Then you could make 'print list' output '5 10 2 4 50' or whatever presentation you like.

You can read introduction to GDB Python scripting here .

You might like the Data Display Debugger , aka DDD:

替代文字

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM