aboutsummaryrefslogtreecommitdiff
path: root/gdb/symfile.c
AgeCommit message (Collapse)AuthorFilesLines
2001-02-192001-02-19 Elena Zannoni <ezannoni@kwikemart.cygnus.com>Elena Zannoni1-2/+2
From Andrew Cagney <cagney@b1.cygnus.com>: * symfile.c (add_symbol_file_command): Always initialize my_cleanup using a NULL cleanup.
2001-01-31Replace strsave() with xstrdup().Andrew Cagney1-3/+3
2001-01-272001-01-26 Fernando Nasser <fnasser@redhat.com>Fernando Nasser1-21/+36
Fix double parsing of filenames passed as command line arguments to GDB (causes weird handling of escape characters). Also, remove dependencies on the CLI from libgdb. * call-cmds.h: Remove declaration of exec_file_command(). * gdbcore.h: Remove declaration of exec_file_command(). Add declarations for exec_open() and exec_file_clear(). * symfile.h: Add declarations for symbol_file_add_main() and symbol_file_clear(). * exec.c (exec_open): New function. Implements to_open for exec targets. (exec_file_clear): New function. Makes GDB forget about a previously specified executable file. (exec_file_attach): Move parsing of arguments from here ... (exec_file_command): ... to here. (init_exec_ops): Use exec_open(), not exec_file_command() to implement to_open for exec targets. * symfile.c (symbol_file_add_main): New function. Call symbol_file_add() with default values. Used when the file name has already been parsed. (symbol_file_clear): New function. Makes GDB forget about previously read symbols. (symbol_file_command): Call the above function instead of inline code. * main.c: Include "symfile.h" and "gdbcore.h" instead of the deprecated "call-cmds.h". (captured_main): Call exec_file_attach() and symbol_file_add_main() instead of exec_file_command() and symbol_file_command(). (captured_main): Add comment. * corefile.c: Include "symfile.h". (core_file_command): Call symbol_file_add_main() instead of symbol_file_command(). (reopen_exec_file): Call exec_open() instead of exec_file_command(). * infcmd.c: Include "symfile.h". (attach_command): Call symbol_file_add_main() instead of symbol_file_command(). * infrun.c: Remove comment about the inclusion of "symfile.h", not any longer appropriate. (follow_exec): Call symbol_file_add_main() instead of symbol_file_command(). * remote-es.c: Include "symfile.h". (es1800_load): Call symbol_file_add_main() instead of symbol_file_command(). * remote-vx.c: Remove comment about the inclusion of "symfile.h", not any longer appropriate. (vx-wait): Call symbol_file_add_main() instead of symbol_file_command(). * solib-svr4.c (open_symbol_file_object): Call symbol_file_add_main() instead of symbol_file_command(). * v850ice.c (ice_file): Call exec_open(), exec_file_attach() and symbol_file_add_main() instead of exec_file_command() and symbol_file_command(). * Makefile.in: Update dependencies.
2001-01-19Replace STRCMP with strcmp()Andrew Cagney1-13/+1
2000-12-15Replace free() with xfree().Kevin Buettner1-17/+17
2000-12-012000-11-30 Fernando Nasser <fnasser@redhat.com>Fernando Nasser1-0/+1
* linespec.h: New file. Declarations for linespec.c. * linespec.c, alpha-tdep.c, breakpoint.c, parse.c, source.c, symtab.c, tracepoint.c: Include the above. * completer.c: New file. Line completion stuff for GDB. (get_gdb_completer_word_break_characters, get_gdb_completer_quote_characters): New functions. Accessors for useful completer internal data. (filename_completer, line_completion_function, skip_quoted): Moved here from top.c. * completer.h: New file. Declarations for the above. * linespec.c (decode_line_1): Use get_gdb_completer_word_break_characters and get_gdb_completer_quote_characters. * top.c: Include completer.h. (filename_completer, line_completion_function, skip_quoted): Moved to completer.c. * corefile.c, exec.c, source.c, symfile.c, linespec.c: Include completer.h. * Makefile.in (SFILES): Add completer.c. (COMMON_OBS): Add completer.o. (completer.o): New target. (linespec.o, alpha-tdep.o, breakpoint.o, parse.o, source.o, symtab.o, tracepoint.o): Add linespec.h to dependencies list. (corefile.o, exec.o, source.o, symfile.o, linespec.o): Add completer.h to dependencies list.
2000-10-27Corrected spelling errors in comments.David Anderson1-1/+1
gdbarch.{c,sh} removed a word from a comment.
2000-10-122000-10-12 Elena Zannoni <ezannoni@kwikemart.cygnus.com>Elena Zannoni1-4/+9
From Daniel Berlin <dberlin@redhat.com> : * symtab.c (lookup_symbol_aux): New function. Renamed from lookup_symbol. Move code to do demangling/case sensitivity to lookup_symbol(). (lookup_symbol): Now wrapper for lookup_symbol_aux, so we can perform case sensitivity/demangling without leaking memory. Move code to do demangling/case sensitivity from old_lookup_symbol to here. (lookup_partial_symbol): Use SYMBOL_SOURCE_NAME instead of SYMBOL_NAME. (lookup_block_symbol): Use SYMBOL_SOURCE_NAME instead of SYMBOL_NAME. Don't do linear search in case of C++. * symfile.c (compare_symbols): Use SYMBOL_SOURCE_NAME instead of SYMBOL_NAME. (compare_psymbols): Same here.
2000-09-02Corrected spelling in comment: dependant -> dependentDavid Anderson1-2/+2
2000-08-072000-08-07 Elena Zannoni <ezannoni@kwikemart.cygnus.com>Elena Zannoni1-1/+1
* objfiles.h (SECT_OFF_BSS): Don't detect invalid sect_index_bss here, let the users of the macro do it. * symtab.h (ANOFFSET): Detect here if the section index is not initialized. * xcoffread.c (find_targ_sec): Don't treat .bss as special, because some objfiles may not have that section at all. * coffread.c (cs_to_section): Ditto. * elfread.c (elf_symtab_read): Detect an uninitialized index value. (elfstab_offset_sections): The macro ANOFFSET cannot be used as an lvalue anymore. * remote.c (get_offsets, remote_cisco_objfile_relocate): Don't use ANOFFSET as an lvalue. * objfiles.c (objfile_relocate, objfile_relocate): Don't use ANOFFSET as an lvalue. * symfile.c (default_symfile_offsets): Don't use ANOFFSET as an lvalue.
2000-07-30Protoization.Kevin Buettner1-195/+87
2000-06-212000-06-21 Pierre Muller <muller@ics.u-strasbg.fr> Pierre Muller1-0/+3
* symfile.c (init_filename_language_table) add ".pas", ".p" and ".pp" as pascal source file extensions.
2000-06-16 * rs6000-tdep.c: Changes throughout for multi-arch 64-bitNicholas Duffek1-46/+44
support. Incorporate most of tm-rs6000.h. (find_toc_address_hook): Rename to rs6000_find_toc_address_hook. (rs6000_set_host_arch_hook): Declare. (read_memory_addr): Define. (pop_frame): Rename to rs6000_pop_frame. (rs6000_pop_frame, rs6000_fix_call_dummy, rs6000_push_arguments, rs6000_frame_saved_pc, rs6000_frame_chain): Remove non-generic dummy frame handling. (branch_dest, rs6000_pop_frame, rs6000_skip_trampoline_code, rs6000_frame_saved_pc, frame_get_saved_regs, frame_initial_stack_address, rs6000_frame_chain, rs6000_convert_from_func_ptr_addr): Call read_memory_addr instead of read_memory_integer. (branch_dest, rs6000_pop_frame, rs6000_push_arguments, rs6000_skip_trampoline_code, rs6000_frame_saved_pc, frame_get_saved_regs, frame_initial_stack_address, rs6000_frame_chain): Replace 4 with TDEP->wordsize. (skip_prologue): Recognize some 64-bit stack adjustments. (push_dummy_frame, pop_dummy_frame, set_processor, show_processor): Delete. (frame_get_saved_regs): Manipulate saved register addresses using CORE_ADDR instead of int. (rs6000_create_inferior): New function. (register_names_*[]): Change to struct reg registers_*[]. (variants[]): Assimilate into multi-arch approach. (register_names_*[], variants[]): Refer to pre-PowerPC architectures as POWER instead of RS6000. * rs6000-nat.c: Ubiquitous changes for 64-bit support. (vmap_secs, xcoff_relocate_symtab): Cast addresses to unsigned long to avoid sign-extension errors. (set_host_arch): New function. (xcoff_relocate_symtab): Try disabling usleep(36000) workaround. (rs6000_core_fns): Use new bfd_target_xcoff_flavour. (_initialize_core_rs6000): Initialize rs6000_set_host_arch_hook. * symfile.c (find_sym_fns): Remove special xcoff kludge. * xcoffread.c (secnum_to_bfd_section): Initialize args.objfile. (process_linenos): Query line struct size from coff backend instead of using compile-time constant. (enter_line_range): Likewise. (read_xcoff_symtab): Pass "XCOFF64" instead of "XCOFF" to record_debugformat() if appropriate. (process_xcoff_symbol): Access symbol addresses using SYMBOL_VALUE_ADDRESS instead of SYMBOL_VALUE. (read_symbol_lineno): Retrieve XCOFF64 symbol names from strtbl. (scan_xcoff_symtab): Likewise. Query syment struct size from coff backend instead of using compile-time constant. (xcoff_sym_fns): Set flavour to bfd_target_xcoff_flavour. * Makefile.in (INTERNAL_LDFLAGS): Add $(MH_LDFLAGS) to list of flags that this Makefile variable get set to. (From Kevin Buettner.) * config/powerpc/aix.mh (MH_LDFLAGS): Add linker flags so that the TOC doesn't overflow. (From Kevin Buettner.) * config/powerpc/tm-ppc-aix.h: Move config decisions to multi-arched rs6000-tdep.c. * config/rs6000/tm-rs6000.h: Likewise. (GDB_MULTI_ARCH): Define. (skip_trampoline_code): Rename to rs6000_skip_trampoline_code. (is_magic_function_pointer): Replace with rs6000_convert_from_func_ptr_addr. (TARGET_CREATE_INFERIOR_HOOK): Define. (find_toc_address_hook): Rename to rs6000_find_toc_address_hook. (rs6000_set_host_arch_hook): Declare. * config/rs6000/nm-rs6000.h (CHILD_XFER_MEMORY): Define.
2000-06-12 * symfile.c (add_symbol_file_command): Properly reformat "else if"Elena Zannoni1-44/+41
code. * coffread.c (coff_symtab_read): Ditto.
2000-06-04Eliminate PARAMS from function pointer declarations.Kevin Buettner1-5/+4
2000-05-28PARAMS removal.Kevin Buettner1-36/+34
2000-05-22Purge (almost) make_cleanup_func.Andrew Cagney1-5/+12
2000-05-16Cleanup bfd_close() cleanups.Andrew Cagney1-1/+1
2000-05-04Elena Zannoni <ezannoni@kwikemart.cygnus.com>Elena Zannoni1-17/+33
* objfiles.h (SECT_OFF_DATA, SECT_OFF_TEXT, SECT_OFF_BSS, SECT_OFF_RODATA): Define as functions of OBJFILE. Add sect_index_text, sect_index_data, sect_index_rodata, sect_index_bss to objfile structure. * gdb-stabs.h (SECT_OFF_DATA, SECT_OFF_TEXT, SECT_OFF_BSS, SECT_OFF_RODATA): Remove. * objfiles.c (allocate_objfile): Initialize sect_index_{text,data,bss,rodata} to -1, for error detection. * symfile.c (default_symfile_offsets): Initialize sect_index_{text,data,bss,rodata} from bfd information. * xcoffread.c (xcoff_symfile_offsets): Ditto. * somread.c (som_symfile_offsets): Initialize sect_index_{text,data,bss,rodata}. * coffread.c, dbxread.c, elfread.c, hp-psymtab-read.c, hp-symtab-read.c, hpread.c, mdebugread.c, minsyms.c, mipsread.c, objfiles.c, os9kread.c, pa64solib.c, partial-stab.h, remote-os9k.c, remote-vx.c, remote.c, rs6000-nat.c, somsolib.c, stabsread.c, symfile.c, xcoffread.c: Update use of SECT_OFF_{TEXT,DATA,BSS,RODATA} to depend on the current objfile. * xcoffread.c: Add new field objfile to find_targ_sec_arg.
2000-04-172000-04-17 Elena Zannoni <ezannoni@kwikemart.cygnus.com>Elena Zannoni1-82/+5
* symfile.h (struct section_addr_info ): Remove fields for special treatment of .text, .data and .bss sections. * solib.c (symbol_add_stub): The special field text_addr is not available anymore. Search for the .text field the hard way. * symfile.c (build_section_addr_info_from_section_table): Don't fill in {text, data, bss}_addr any more. (default_symfile_offsets): Don't use {text, data, bss}_addr fields to fill in section_offsets for objfile. (syms_from_objfile): Don't deal with {text, data, bss}_addr as a special case anymore. (add_symbol_file_command): Ditto.
2000-04-172000-04-17 Elena Zannoni <ezannoni@kwikemart.cygnus.com>Elena Zannoni1-45/+16
symfile.c: (symbol_file_command): Remove support for rombug, to simplify code.
2000-04-172000-04-17 Elena Zannoni <ezannoni@kwikemart.cygnus.com>Elena Zannoni1-154/+125
* symfile.c (add_symbol_file_command): Rewrite the arguments processing part. Simplify syntax of command. Remove support for rombug. (_initialize_symfile): Update help message for add-symbol-file command.
2000-04-03 * symfile.c (map_overlay_command, unmap_overlay_command): FixEli Zaretskii1-2/+6
error message: there's no "overlay on" command.
2000-03-21Make sure section addresses from a shared object are correctly set inKevin Buettner1-3/+55
a new struct objfile.
2000-03-152000-03-15 Michael Snyder <msnyder@cleaver.cygnus.com>Michael Snyder1-0/+4
From "Peter.Schauer" <Peter.Schauer@regent.e-technik.tu-muenchen.de> * symfile.c (reread_symbols): Clear msymbol hash table.
2000-02-03import gdb-2000-02-02 snapshotJason Molenda1-0/+36
2000-02-02import gdb-2000-02-01 snapshotJason Molenda1-3/+2
1999-12-07import gdb-1999-12-06 snapshotJason Molenda1-5/+18
1999-11-09import gdb-1999-11-08 snapshotJason Molenda1-2/+5
1999-10-19import gdb-1999-10-18 snapshotJason Molenda1-69/+114
1999-10-12import gdb-1999-10-11 snapshotJason Molenda1-19/+7
1999-10-05import gdb-1999-10-04 snapshotJason Molenda1-63/+327
1999-09-09import gdb-1999-09-08 snapshotStan Shebs1-24/+13
1999-08-31import gdb-1999-08-30 snapshotJason Molenda1-3/+0
1999-08-23import gdb-1999-08-23 snapshotJason Molenda1-9/+3
1999-08-09import gdb-1999-08-09 snapshotJason Molenda1-18/+20
1999-08-02import gdb-1999-08-02 snapshotJason Molenda1-2/+2
1999-07-27import gdb-1999-07-26 snapshotJason Molenda1-0/+1
1999-07-07import gdb-1999-07-07 post reformatJason Molenda1-723/+753
1999-05-25import gdb-1999-05-25 snapshotJason Molenda1-0/+8
1999-04-26import gdb-19990422 snapshotStan Shebs1-1/+1
1999-04-16Initial creation of sourceware repositorygdb-4_18-branchpointStan Shebs1-0/+3021
1999-04-16Initial creation of sourceware repositoryStan Shebs1-3107/+0
1998-12-31all remaining *.c *.h files from hp merge.David Taylor1-59/+456
1998-09-09Cleanup opportunity discovered while updating internals manual.Stan Shebs1-13/+23
* symtab.h (struct symtab): Remove EXTRA_SYMTAB_INFO hook, not currently used. * symfile.c (allocate_symtab): Deprecate use of INIT_EXTRA_SYMTAB_INFO here.
1998-06-09 * symfile.c (symbol_file_add): Always call theKeith Seitz1-15/+19
pre/post_add_symbol_hooks. * gdbtk.c (gdb_get_vars_command): Return static variables and variables stored in registers.
1998-04-23 * symfile.c (deduce_language_from_filename): .class implies java.Per Bothner1-1/+1
1998-04-23Thu Apr 23 12:27:43 1998 Philippe De Muyter <phdm@macqel.be>Jason Molenda1-32/+65
* symfile.c (simple_overlay_update_1): Do not prefix array address by `&'. * bcache.h (BCACHE_DATA_ALIGNMENT): Ditto. * tracepoint.c (encode_actions): Ditto. * language.c, complaints.c, utils.c (varargs.h): Do not include that file here, it is already included indirectly by defs.h. * dbxread.c (dbx_symfile_init, process_one_symbol): Cast xmalloc return value to the appropriate pointer type. * utils.c (floatformat_from_doublest): Ditto. * tracepoint.c (read_actions, _initialize_tracepoint): Ditto. (add_memrange): Likewise with xrealloc return value. * stabsread.c (ref_add): Ditto. * coffread.c (coff_symfile_init): Likewise for xmmalloc return value. * elfread.c (elf_symfile_read): Ditto. * os9kread.c (os9k_symfile_init): Ditto.
1998-01-23 * config/d10v/tm-d10v.h (CALL_DUMMY): Define as "{ 0 }".Fred Fish1-50/+121
(TARGET_READ_FP): Define to d10v_read_fp rather than d10v_read_sp. (TARGET_WRITE_FP): Define to d10v_write_fp rather than d10v_write_sp. (d10v_write_fp, d10v_read_fp): Add prototypes. * symtab.c (decode_line_1): Remove assignment of sals[0].pc field. * symfile.c (simple_overlay_update, simple_overlay_update_1): Ignore the size of overlay sections. This check is redundant anyway. * printcmd.c (print_frame_args): Ditto. * valops.c (value_fetch_lazy): Ditto. * values.c (unpack_long): Ditto. * d10v-tdep.c (d10v_frame_chain, d10v_frame_find_saved_regs, d10v_init_extra_frame_info): Fix some minor bugs so the finish command works properly. (show_regs): Change num1 and num2 types from "long long" to "LONGEST". (d10v_read_fp, d10v_write_fp): New functions. (d10v_push_arguments): Remove unneeded assigns to "val" and "contents". (d10v_push_arguments): Fix for pointers and structs. (d10v_extract_return_value): Fix for pointers and chars.
1997-06-13 * symfile.c (generic_load): Check return code of target_write_memory.David Edelsohn1-2/+4