is active.
* New built-in convenience variables $_active_linker_namespaces and
- $_current_linker_namespace. These show the number of active linker
+ $_linker_namespace. These show the number of active linker
namespaces, and the namespace to which the current location belongs to.
In systems that don't support linker namespaces, these always return
the integers 1 and 0 respectively.
Number of active linkage namespaces in the inferior. In systems with no
support for linkage namespaces, this variable will always be set to @samp{1}.
-@vindex $_current_linker_namespace@r{, convenience variable}
-@item $_current_linker_namespace
+@vindex $_linker_namespace@r{, convenience variable}
+@item $_linker_namespace
The namespace which contains the current location in the inferior. This
returns @value{GDBN}'s internal numbering for the namespace. In systems with no
support for linker namespaces, this variable will always be set to
return {};
}
-/* Implementation of the current_linker_namespace convenience variable.
+/* Implementation of the linker_namespace convenience variable.
This returns the GDB internal identifier of the linker namespace,
for the current frame, as an integer. If the inferior doesn't support
linker namespaces, this always returns 0. */
static value *
-current_linker_namespace_make_value (gdbarch *gdbarch, internalvar *var,
+linker_namespace_make_value (gdbarch *gdbarch, internalvar *var,
void *ignore)
{
const solib_ops *ops = gdbarch_so_ops (gdbarch);
return value_from_longest (builtin_type (gdbarch)->builtin_int, nsid);
}
-/* Implementation of `$_current_linker_namespace' variable. */
+/* Implementation of `$_linker_namespace' variable. */
-static const struct internalvar_funcs current_linker_namespace_funcs =
+static const struct internalvar_funcs linker_namespace_funcs =
{
- current_linker_namespace_make_value,
+ linker_namespace_make_value,
nullptr,
};
/* Convenience variables for debugging linker namespaces. These are
set here, even if the solib_ops doesn't support them,
for consistency. */
- create_internalvar_type_lazy ("_current_linker_namespace",
- ¤t_linker_namespace_funcs, nullptr);
+ create_internalvar_type_lazy ("_linker_namespace",
+ &linker_namespace_funcs, nullptr);
set_internalvar_integer (lookup_internalvar ("_active_linker_namespaces"), 1);
add_com (
{$_shell_exitsignal = void} \
{$_shell_exitcode = 0} \
{$_active_linker_namespaces = 1} \
- {$_current_linker_namespace = <error: No registers.>}\
+ {$_linker_namespace = <error: No registers.>}\
}
if [allow_python_tests] {
append show_conv_list \
gdb_test "print \$_active_linker_namespaces" "1" \
"1 namespace before starting inferior"
- gdb_test "print \$_current_linker_namespace" "No registers." \
+ gdb_test "print \$_linker_namespace" "No registers." \
"No current namespace before starting inferior"
if { ![runto_main] } {
gdb_test "print \$_active_linker_namespaces" "1" \
"Before activating namespaces"
- gdb_test "print \$_current_linker_namespace" ".* = 0" \
+ gdb_test "print \$_linker_namespace" ".* = 0" \
"Still in the default namespace"
gdb_breakpoint "inc" allow-pending
foreach_with_prefix dl {3 2 1} {
gdb_continue_to_breakpoint "inc"
- gdb_test "print \$_current_linker_namespace" ".* = $dl" \
+ gdb_test "print \$_linker_namespace" ".* = $dl" \
"Verify we're in namespace $dl"
}
# breakpoints and pending breakpoints at the same time with
# gdb_breakpoint.
gdb_test "next" ".*assert.*" "load the first SO"
- gdb_breakpoint "inc if \$_current_linker_namespace == 2"
+ gdb_breakpoint "inc if \$_linker_namespace == 2"
gdb_continue_to_breakpoint "inc"
gdb_continue_to_end "" continue 1
}