]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gdb/stack.c
constify struct block in some places
[thirdparty/binutils-gdb.git] / gdb / stack.c
index 4f16238e95b7e4488b585d7194171584bf1a5f11..0d6d8e799cb68675eceed18e037a417c3be255e6 100644 (file)
@@ -538,7 +538,7 @@ print_frame_args (struct symbol *func, struct frame_info *frame,
 
   if (func)
     {
-      struct block *b = SYMBOL_BLOCK_VALUE (func);
+      const struct block *b = SYMBOL_BLOCK_VALUE (func);
       struct block_iterator iter;
       struct symbol *sym;
 
@@ -1928,7 +1928,7 @@ backtrace_full_command (char *arg, int from_tty)
    CB_DATA.  */
 
 static void
-iterate_over_block_locals (struct block *b,
+iterate_over_block_locals (const struct block *b,
                           iterate_over_block_arg_local_vars_cb cb,
                           void *cb_data)
 {
@@ -2011,7 +2011,7 @@ print_block_frame_labels (struct gdbarch *gdbarch, struct block *b,
    superblocks, stopping when the top-level block is reached.  */
 
 void
-iterate_over_block_local_vars (struct block *block,
+iterate_over_block_local_vars (const struct block *block,
                               iterate_over_block_arg_local_vars_cb cb,
                               void *cb_data)
 {
@@ -2073,7 +2073,7 @@ print_frame_local_vars (struct frame_info *frame, int num_tabs,
                        struct ui_file *stream)
 {
   struct print_variable_and_value_data cb_data;
-  struct block *block;
+  const struct block *block;
   CORE_ADDR pc;
 
   if (!get_frame_pc_if_available (frame, &pc))
@@ -2118,7 +2118,7 @@ locals_info (char *args, int from_tty)
    Returns 1 if any argument was walked; 0 otherwise.  */
 
 void
-iterate_over_block_arg_vars (struct block *b,
+iterate_over_block_arg_vars (const struct block *b,
                             iterate_over_block_arg_local_vars_cb cb,
                             void *cb_data)
 {
@@ -2221,7 +2221,7 @@ select_and_print_frame (struct frame_info *frame)
    code address within the block returned.  We use this to decide
    which macros are in scope.  */
 
-struct block *
+const struct block *
 get_selected_block (CORE_ADDR *addr_in_block)
 {
   if (!has_stack_frames ())