aboutsummaryrefslogtreecommitdiff
path: root/gdb/stack.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2022-06-06 09:56:30 -0600
committerTom Tromey <tromey@adacore.com>2022-06-07 07:21:26 -0600
commit6d08aed3c98dd073d79365bc12a675fe0930aee7 (patch)
treeacff0de8cd7eb8eb45b4e16cc019ac0bb460e6a9 /gdb/stack.c
parentb11f3dbb884dfacd1d581dbccc017fa1da155ead (diff)
downloadgdb-6d08aed3c98dd073d79365bc12a675fe0930aee7.zip
gdb-6d08aed3c98dd073d79365bc12a675fe0930aee7.tar.gz
gdb-6d08aed3c98dd073d79365bc12a675fe0930aee7.tar.bz2
Constify solib_name_from_address
I noticed that solib_name_from_address returned a non-const string, but it's more appropriate to return const. This patch implements this. Tested by rebuilding.
Diffstat (limited to 'gdb/stack.c')
-rw-r--r--gdb/stack.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gdb/stack.c b/gdb/stack.c
index 71d8598..80801cc 100644
--- a/gdb/stack.c
+++ b/gdb/stack.c
@@ -1427,8 +1427,9 @@ print_frame (const frame_print_options &fp_opts,
if (print_what != SHORT_LOCATION
&& pc_p && (funname == NULL || sal.symtab == NULL))
{
- char *lib = solib_name_from_address (get_frame_program_space (frame),
- get_frame_pc (frame));
+ const char *lib
+ = solib_name_from_address (get_frame_program_space (frame),
+ get_frame_pc (frame));
if (lib)
{