Now that stabs is deprecated, we should probably warn our users of it
before removing support, so that they have time to react and either make
themselves heard, or fix things on their end so that they can still debug
their applications.
This commit adds a new function that emits a warning whenever GDB does
stabs reading. Since there are several places where stabs is
re-invented, this warning had to be added to many places, but I think I
managed to warn everywhere relevant without duplicating warnings.
Also, the test gdb.stabs/weird.exp explicitly checks for GDB warnings
when reading stabs, so it had to be updated to account for the
deprecation warning. It is done generically, since it will be removed in
the next release anyway.
Approved-By: Tom Tromey <tom@tromey.com>
const char *name = bfd_get_filename (sym_bfd);
unsigned int stabsize;
+ stabs_deprecated_warning ();
/* Allocate struct to keep track of stab reading. */
dbx_objfile_data_key.emplace (objfile);
dbx_symfile_info *key = dbx_objfile_data_key.get (objfile);
{
stabsread_new_init ();
init_header_files ();
+ warning (_("The a.out file format is deprecated and will be removed soon."));
}
&sh);
if (strcmp (debug_info->ss + fh->issBase + sh.iss,
stabs_symbol) == 0)
- processing_gcc_compilation = 2;
+ {
+ processing_gcc_compilation = 2;
+ stabs_deprecated_warning ();
+ }
}
if (processing_gcc_compilation != 0)
sym_bfd = objfile->obfd.get ();
+ stabs_deprecated_warning ();
+
/* .o and .nlm files are relocatables with text, data and bss segs based at
0. This flag disables special (Solaris stabs-in-elf only) fixups for
symbols with a value of 0. */
int file_string_offset;
enum language pst_language;
};
+
+static inline void
+stabs_deprecated_warning ()
+{
+ warning (_("Stabs support is deprecated and will be removed soon."));
+}
#endif /* GDB_STABSREAD_H */
send_gdb "y\n"
exp_continue
}
- -re "^Reading symbols from .*$binfile_re\\.\\.\\.(|\r\nUsing host libthread_db library .*libthread_db.so.*\\.)\r\n$gdb_prompt $" {
+ -re "^Reading symbols from .*$binfile_re\\.\\.\\.(|\r\nUsing host libthread_db library .*libthread_db.so.*\\.)\r\n(\[^\\n\]*\n)?$gdb_prompt $" {
pass "weirdx.o read without error"
}
-re ".*$gdb_prompt $" {
if (num_symbols > 0)
{
+ stabs_deprecated_warning ();
/* Read the string table. */
init_stringtab (abfd, stringtab_offset, objfile);