aboutsummaryrefslogtreecommitdiff
path: root/gdb/target-delegates.c
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2017-12-03 12:50:43 -0500
committerSimon Marchi <simon.marchi@polymtl.ca>2017-12-03 12:50:43 -0500
commit10f64178412d9c6e4f2faade0da271ab8be273c9 (patch)
treee75f837815c06fd77ded2af537afe44b86c7833d /gdb/target-delegates.c
parentf0fb2488c93c00fa1436a4813a375faa00a94de5 (diff)
downloadgdb-10f64178412d9c6e4f2faade0da271ab8be273c9.zip
gdb-10f64178412d9c6e4f2faade0da271ab8be273c9.tar.gz
gdb-10f64178412d9c6e4f2faade0da271ab8be273c9.tar.bz2
Make make-target-delegates grok namespace scope op and template params
The next patch will want to use gdb::array_view<int> as parameter type of a target_ops method. However, that runs into a make-target-delegates limitation: target_debug_foo calls in target-delegates.c for parameters/return types with namespace scope operators ("::") or template parameters, end up looking like: @@ -1313,9 +1313,7 @@ debug_set_syscall_catchpoint (struct target_ops *self, int arg1, int arg2, int a fputs_unfiltered (", ", gdb_stdlog); target_debug_print_int (arg3); fputs_unfiltered (", ", gdb_stdlog); - target_debug_print_int (arg4); - fputs_unfiltered (", ", gdb_stdlog); - target_debug_print_int_p (arg5); + target_debug_print_gdb::array_view<const_int> (arg4); which obviously isn't something that compiles. The problem is that make-target-delegates wasn't ever taught that '::', '<', and '>' can appear in parameter/return types. You could work around it by hidding the unsupported characters behind a typedef in the target method declaration, or by using an explicit TARGET_DEBUG_PRINTER, but it's better to just remove the limitation. While at it, also fix an "abuse" of reserved identifiers. gdb/ChangeLog: * make-target-delegates (munge_type): Also munge '<', '>', and ':'. Avoid double underscores in identifiers, and trailing underscores. * target-debug.h (target_debug_print_VEC_static_tracepoint_marker_p__p): Rename to ... (target_debug_print_VEC_static_tracepoint_marker_p_p): ... this. * target-delegates.c: Regenerate.
Diffstat (limited to 'gdb/target-delegates.c')
-rw-r--r--gdb/target-delegates.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/target-delegates.c b/gdb/target-delegates.c
index e0d7a9a..1cbe6f8 100644
--- a/gdb/target-delegates.c
+++ b/gdb/target-delegates.c
@@ -3352,7 +3352,7 @@ debug_static_tracepoint_markers_by_strid (struct target_ops *self, const char *a
fputs_unfiltered (", ", gdb_stdlog);
target_debug_print_const_char_p (arg1);
fputs_unfiltered (") = ", gdb_stdlog);
- target_debug_print_VEC_static_tracepoint_marker_p__p (result);
+ target_debug_print_VEC_static_tracepoint_marker_p_p (result);
fputs_unfiltered ("\n", gdb_stdlog);
return result;
}