[PATCH 4/6] Add LineTableEntry.column to python line table interface
Tom de Vries
tdevries@suse.de
Wed May 27 13:50:16 GMT 2020
On 16-05-2020 19:26, Hannes Domani via Gdb-patches wrote:
> diff --git a/gdb/symtab.h b/gdb/symtab.h
> index c936c858e6..fb1b8c9393 100644
> --- a/gdb/symtab.h
> +++ b/gdb/symtab.h
> @@ -2274,7 +2274,8 @@ void iterate_over_symtabs (const char *name,
>
>
> std::vector<CORE_ADDR> find_pcs_for_symtab_line
> - (struct symtab *symtab, int line, struct linetable_entry **best_entry);
> + (struct symtab *symtab, int line, struct linetable_entry **best_entry,
> + std::vector<int> *columns = nullptr);
>
> /* Prototype for callbacks for LA_ITERATE_OVER_SYMBOLS. The callback
> is called once per matching symbol SYM. The callback should return
>
Hi,
I just tried to build this, and ran into:
...
In file included from /data/gdb_versions/devel/src/gdb/gdb_curses.h:55:0,
from /data/gdb_versions/devel/src/gdb/tui/tui-data.h:26,
from /data/gdb_versions/devel/src/gdb/tui/tui-command.h:25,
from /data/gdb_versions/devel/src/gdb/tui/tui.c:26:
/data/gdb_versions/devel/src/gdb/symtab.h:2276:24: error: expected ','
or '...' before '(' token
std::vector<int> *columns = nullptr);
^
make[1]: *** [Makefile:1610: tui/tui.o] Error 1
...
The "columns" string is defined as a macro by /usr/include/ncurses/term.h:
...
#define columns CUR Numbers[0]
...
so after preprocessing we have:
...
std::vector<CORE_ADDR> find_pcs_for_symtab_line
(struct symtab *symtab, int line, struct linetable_entry **best_entry,
std::vector<int> *
# 2276 "/data/gdb_versions/devel/src/gdb/symtab.h" 3 4
((TERMTYPE *)(_nc_cur_term()))-> Numbers[0]
# 2276 "/data/gdb_versions/devel/src/gdb/symtab.h"
= nullptr);
...
Thanks,
- Tom
More information about the Gdb-patches
mailing list