From 64a1f185b376c83278d1fe2ef0ad8a79aeffcb24 Mon Sep 17 00:00:00 2001 From: Guinevere Larsen Date: Mon, 9 Sep 2024 15:06:29 -0300 Subject: gdb: Move dbx_end_psymtab to stabsread, and rename to stabs_end_psymtab This function is used by multiple stabs readers (even if not all), and the comment in stabsread.h even acknowledges it. I believe that the comment is incorrect in saying that the function should be in dbxread because not everyone uses it. If any one reader other than dbx uses it, the function should be in stabsread, in my opinion. This commit makes also renames the function to stabs_end_psymtab since, again, this is not specific to dbx/aout format. struct symloc had to be moved because stabs_end_psymtab dereferences symloc objects, so stabsread.c must be aware of the full struct. Approved-By: Tom Tromey --- gdb/symtab.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gdb/symtab.h') diff --git a/gdb/symtab.h b/gdb/symtab.h index 5410f41..a2cc1eb 100644 --- a/gdb/symtab.h +++ b/gdb/symtab.h @@ -808,7 +808,7 @@ struct minimal_symbol : public general_symbol_info m_target_flag_2 = target_flag_2; } - /* Size of this symbol. dbx_end_psymtab in dbxread.c uses this + /* Size of this symbol. stabs_end_psymtab in stabsread.c uses this information to calculate the end of the partial symtab based on the address of the last symbol plus the size of the last symbol. */ -- cgit v1.1