ant2009
ant2009

Reputation: 22696

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,

Upvotes: 4

Views: 473

Answers (2)

Nikolai Fetissov
Nikolai Fetissov

Reputation: 84239

You might like the Data Display Debugger, a.k.a. DDD:

alt text

Upvotes: 1

Laurynas Biveinis
Laurynas Biveinis

Reputation: 10856

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.

Upvotes: 1

Related Questions