From 0cf566ec651d073db71dad1de50a0df77587fbd2 Mon Sep 17 00:00:00 2001 From: David Carlton Date: Mon, 2 Jun 2003 18:36:33 +0000 Subject: [PATCH] 2003-06-02 David Carlton * block.c (contained_in): Add 'const' to arguments. (block_function): Ditto. * block.h: Update declarations for block_function and contained_in. --- gdb/ChangeLog | 7 +++++++ gdb/block.c | 4 ++-- gdb/block.h | 4 ++-- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 2d58e685de8..f85e00c00af 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,10 @@ +2003-06-02 David Carlton + + * block.c (contained_in): Add 'const' to arguments. + (block_function): Ditto. + * block.h: Update declarations for block_function and + contained_in. + 2003-06-02 David Carlton * objc-lang.c (find_imps): Delete unneeded variable 'sym_symtab'. diff --git a/gdb/block.c b/gdb/block.c index 09c51b69c47..98b6ccbb84b 100644 --- a/gdb/block.c +++ b/gdb/block.c @@ -44,7 +44,7 @@ static void block_initialize_namespace (struct block *block, Return zero otherwise. */ int -contained_in (struct block *a, struct block *b) +contained_in (const struct block *a, const struct block *b) { if (!a || !b) return 0; @@ -57,7 +57,7 @@ contained_in (struct block *a, struct block *b) lexical block, described by a struct block BL. */ struct symbol * -block_function (struct block *bl) +block_function (const struct block *bl) { while (BLOCK_FUNCTION (bl) == 0 && BLOCK_SUPERBLOCK (bl) != 0) bl = BLOCK_SUPERBLOCK (bl); diff --git a/gdb/block.h b/gdb/block.h index 442fa4a86e4..8334a3bca12 100644 --- a/gdb/block.h +++ b/gdb/block.h @@ -187,9 +187,9 @@ struct blockvector #define STATIC_BLOCK 1 #define FIRST_LOCAL_BLOCK 2 -extern struct symbol *block_function (struct block *); +extern struct symbol *block_function (const struct block *); -extern int contained_in (struct block *, struct block *); +extern int contained_in (const struct block *, const struct block *); extern struct blockvector *blockvector_for_pc (CORE_ADDR, int *); -- 2.30.2