1

I start gdb in emacs with 'gdb' command. Is there a way to hide certain lines from being shown in gud buffer? For example, when I do C-c C-c on a running program, I see the following in the buffer:

Program received signal SIGINT, Interrupt. 0x0000555555555182 in main (argc=1, argv=0x7fffffffdf58) at test.cpp:6 6 for ( i=0;i<2000000000;++i){ 

Is there any way I can configure emacs to show a shorter string instead, for example "Interrupt test.cpp:6"?

1
  • Sure, I modified the question. Commented Oct 31, 2020 at 7:56

1 Answer 1

0

One idea is to add advice for gud-gdbmi-marker-filter arguments:

(defun my_filter (string) "Filter out certain messages from GDB-MI." (progn ; (message (nth 0 string)) (if (string-match "pattern" (nth 0 string)) (list nil) string))) (advice-add 'gud-gdbmi-marker-filter :filter-args 'my_filter) 

pattern here is regualr expression for what needs to be filtered. I think I had some glitches with it, and after all I didn't need this, but I hope this may help somebody else in future.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.