aboutsummaryrefslogtreecommitdiff
path: root/gdb/source.c
AgeCommit message (Collapse)AuthorFilesLines
2002-01-17Remove else clause to #if UI_OUT.Andrew Cagney1-34/+0
2002-01-05Remove obsolete MacOS support.Andrew Cagney1-34/+3
2001-12-21 * configure, config.in: Rebuilt.Tom Tromey1-2/+14
* configure.in: Check for realpath. * defs.h (gdb_realpath): Declare. * symtab.h (partial_symtab): Added fullname field. * source.c (openp): Use gdb_realpath. (forget_cached_source_info): Clear full name of each partial symtab. * utils.c (gdb_realpath): New function. * symtab.c (lookup_symtab): Removed. (lookup_symtab_1): Renamed to lookup_symtab. (lookup_symtab): Look for real path. (lookup_partial_symtab): Likewise.
2001-12-02mfree() -> xmfree().Andrew Cagney1-3/+3
2001-07-17 * source.c (find_source_lines): Remove tui test, must be replacedStephane Carrez1-74/+1
by appropriate warning hook. (print_source_lines): Remove tui hacks, must be replaced by cli. (forward_search_command): Remove tui hacks, can be replaced by appropriate calls to identify_source_line when tui scrolls. (reverse_search_command): Likewise.
2001-07-152001-07-15 Elena Zannoni <ezannoni@redhat.com>Elena Zannoni1-0/+1
* top.c (readline_line_completion_function, noop_completer): Move from here... * completer.c (readline_line_completion_function, noop_completer): ...to here. * gdbcmd.h (readline_line_completion_function, noop_completer): Move declarations from here... * completer.h (readline_line_completion_function, noop_completer): ...to here. * corefile.c: Include completer.h. * source.c: Ditto. * symfile.c: Ditto. * Makefile.in: Update dependencies.
2001-07-07* symtab.c (main_name): New function.Andrew Cagney1-2/+2
(set_main_name): New function. * symtab.h: Declare. * TODO: Update From 2000-03-05 Anthony Green <green@redhat.com>: * dbxread.c (process_one_symbol): Handle the N_MAIN stab by setting main_name. * blockframe.c (inside_main_func): Use main_name instead of "main". * symtab.c (find_main_psymtab): Ditto. * source.c (select_source_symtab): Ditto. * nlmread.c (nlm_symfile_read): Ditto. * rs6000-tdep.c (skip_prologue): Ditto.
2001-06-13s/basename/lbasename/ clean up consequences of assuming lbasename()Andrew Cagney1-2/+2
returns const char *.
2001-06-12s/char */const char */Andrew Cagney1-7/+10
2001-06-06 * source.c (mod_path, openp): Use #ifdef HAVE_DOS_BASED_FILE_SYSTEMEli Zaretskii1-2/+2
instead of #if HAVE_DOS_BASED_FILE_SYSTEM. * completer.c: Ditto. * cli/cli-cmds.c (cd_command): Ditto.
2001-06-04 * source.c (mod_path, openp): Use HAVE_DOS_BASED_FILE_SYSTEMEli Zaretskii1-14/+15
instead of system-specific define's like _WIN32 and __MSDOS__. Use IS_DIR_SEPARATOR and IS_ABSOLUTE_PATH instead of SLASH_P and ROOTED_P. (top-level): #include "filenames.h". * solib.c (solib_open): Use IS_DIR_SEPARATOR and IS_ABSOLUTE_PATH instead of SLASH_CHAR, ROOTED_P and SLASH_P. (top-level): #include "filenames.h". * defs.h (SLASH_P, SLASH_CHAR, ROOTED_P): Remove definitions. (SLASH_STRING): Define only for _WIN32. * completer.c: Use HAVE_DOS_BASED_FILE_SYSTEM instead of __MSDOS_. * cli/cli-cmds.c (cd_command): Use IS_DIR_SEPARATOR and IS_ABSOLUTE_PATH instead of SLASH_P and ROOTED_P. Replace system-specific ifdefs with HAVE_DOS_BASED_FILE_SYSTEM. (top-level): #include "filenames.h".
2001-04-19Obsolete MPW as host.Andrew Cagney1-32/+32
2001-04-05* main.c: Remove windows.h use.Christopher Faylor1-3/+3
(gdbtk_test): Use PATH_MAX for home var calculation. * remote-e7000.c (e7000_parse_device): Accomodate Cygwin as well as Win32 in test. * ser-tcp.c: Use modern __CYGWIN__ conditional. * source.c (mod_path): Add __CYGWIN__ conditional to WIN32 test. (openp): Ditto. * symfile.c (symfile_bfd_open): Ditto. * gdbtk/generic/gdbtk.c: Ditto.
2001-03-27* arch-utils.c (#include "gdbthread.h"): Removed.J.T. Conklin1-1/+0
(#include "symfile.h"): Removed. (XMALLOC): Removed unused macro. * breakpoint.c (tbreak_command): Removed local declaration. (awatch_command, do_enable_breakpoint, set_breakpoint_count): Remove duplicate declarations. (bpstat_should_step, bpstat_have_active_hw_watchpoints) (remove_solib_event_breakpoints): Fix indentation botch. * c-typeprint.c (#include "command.h"): Removed. (#include "gdbcmd.h"): Removed. * ch-exp.c (ch_terminal_match_float_literal, parse_expr) (parse_primval, parse_untyped_expr, parse_opt_untyped_expr): Removed duplicate declarations. * ch-typeprint.c (#include "command.h"): Removed. (#include "gdbcmd.h"): Removed. * corefile.c (#include "frame.h"): Removed (#include "symfile.h"): Removed. (#include "language.h"): Removed. * dbxread.c (#include "command.h"): Removed. * environ.c (#include "gdbcore.h"): Removed. * event-loop.c (#include "top.h"): Removed. * f-typeprint.c (#include "command.h"): Removed. (#include "gdbcmd.h"): Removed. (#include "language.h"): Removed. (#include "typeprint.h"): Removed. (#include "frame.h"): Removed. * gdbtypes.h (print_type_scalar): Removed declaration. * infcmd.c (#include "completer.h"): Removed. * language.c (#include "frame.h"): Removed. * m2-typeprint.c (#include "command.h"): Removed. (#include "gdbcmd.h"): Removed. (#include "language.h"): Removed. * m2-valprint.c (#include "valprint.h"): Removed. * p-typeprint.c (#include "command.h"): Removed. (#include "gdbcmd.h"): Removed. * p-valprint.c (#include "typeprint.h"): Removed. * parse.c (#include "linespec.h"): Removed. * regcache.c (#include "frame.h"): Removed. * remote.c (#include "frame.h"): Removed. (getpkt_sane): Make static. * source.c (#include "completer.h"): Removed. * stack.c (#include "symfile.h"): Removed. (#include "objfiles.h"): Removed. * symfile.c (#include "completer.h"): Removed. * tracepoint.c (#include "completer.h"): Removed. * values.c (#include "frame.h"): Removed. * varobj.c (#include "valprint.h"): Removed. * wrapper.c (#include "frame.h"): Removed. * memattr.c (create_mem_region): Removed unused variable. * remote-nrom.c: Removed spurious semicolon after init_nrom_ops. -------------------------------------------------------------------
2001-03-06Update/correct copyright notices.Kevin Buettner1-1/+2
2001-02-08Add __FILE__ and __LINE__ parameter to internal_error() /Andrew Cagney1-1/+3
internal_verror().
2001-01-31Replace strsave() with xstrdup().Andrew Cagney1-3/+3
2001-01-162001-01-16 Michael Snyder <msnyder@cleaver.cygnus.com>Michael Snyder1-1/+1
* source.c (openp): Fix typo in comment.
2000-12-15Replace free() with xfree().Kevin Buettner1-13/+13
2000-12-012000-11-30 Fernando Nasser <fnasser@redhat.com>Fernando Nasser1-0/+2
* 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-07-30Protoization.Kevin Buettner1-70/+26
2000-05-28PARAMS removal.Kevin Buettner1-12/+13
2000-04-042000-04-03 H.J. Lu <hjl@gnu.org>H.J. Lu1-1/+1
* gdb_regex.h: New. Include "regex.h" if USE_INCLUDED_REGEX is defined and <regex.h> otherwise. * irix5-nat.c: Include "gdb_regex.h" instead of "gnu-regex.h". * monitor.c: Likewise. * osfsolib.c: Likewise. * solib.c: Likewise. * source.c: Likewise. * symtab.c: Likewise. * Makefile.in (REGEX): Changed to @REGEX@. (REGEX_CFLAGS): New. (REGEX1): Removed. (ADD_DEPS): Use $(REGEX) instead of $(REGEX1). (INTERNAL_WARN_CFLAGS): Add $(REGEX_CFLAGS). * configure.in (--with-included-regex): New switch. (REGEX): New. Subsstitue @REGEX@ in Makefile.in. (REGEX_CFLAGS): New. Subsstitue @REGEX_CFLAGS@ in Makefile.in. * configure: Regenerated.
2000-02-03import gdb-2000-02-02 snapshotJason Molenda1-0/+62
1999-09-22import gdb-1999-09-21Jason Molenda1-6/+1
1999-09-09import gdb-1999-09-08 snapshotStan Shebs1-13/+6
1999-08-31import gdb-1999-08-30 snapshotJason Molenda1-3/+0
1999-08-16import gdb-1999-08-16 snapshotJason Molenda1-10/+42
1999-08-09import gdb-1999-08-09 snapshotJason Molenda1-1/+1
1999-07-07import gdb-1999-07-07 post reformatJason Molenda1-262/+283
1999-07-05import gdb-1999-07-05 snapshotJason Molenda1-1/+1
1999-06-21import gdb-1999-06-21 snapshotJason Molenda1-1/+0
1999-05-05import gdb-19990504 snapshotStan Shebs1-1/+1
1999-04-26import gdb-19990422 snapshotStan Shebs1-14/+18
1999-04-16Initial creation of sourceware repositorygdb-4_18-branchpointStan Shebs1-0/+1724
1999-04-16Initial creation of sourceware repositoryStan Shebs1-1538/+0
1998-04-08Ack, forgot to update copyright to 1998.Jason Molenda1-1/+1
1998-04-08Wed Apr 8 16:57:22 1998 Philippe De Muyter <phdm@macqel.be>Jason Molenda1-14/+37
* source.c: Remove obsolete decl of strstr().
1997-06-28 * buildsym.h (struct subfile): Add debugformat member.Fred Fish1-17/+34
(record_debugformat): Declare global function. * buildsym.c (start_subfile): Initialize debugformat member to NULL. (record_debugformat): New function to record the format. (end_symtab): Copy format into symtab debugformat member. (end_symtab): Free subfile debugformat member. * symmisc.c (free_symtab): Free debugformat when freeing symtab. * symfile.c (allocate_symtab): Initialize the new debugformat member for new symtabs. * symtab.h (struct symtab): Add debugformat member. * source.c (source_info): Print the debug format. * os9kread.c (os9k_process_one_symbol): Call record_debugformat with "OS9". * hpread.c (hpread_expand_symtab): Call record_debugformat with "HP". (hpread_process_one_debug_symbol): Ditto. * dbxread.c (process_one_symbol): Call record_debugformat with "stabs". * coffread.c (coff_start_symtab): Call record_debugformat with "COFF". * xcoffread.c (read_xcoff_symtab): Call record_debugformat with "XCOFF". * dwarfread.c (read_file_scope): Call record_debugformat with "DWARF 1". * dwarf2read.c (read_file_scope): Call record_debugformat with "DWARF 2". * dstread.c (dst_end_symtab): Set debugformat to be "Apollo DST". * mdebugread.c (new_symtab): Set debugformat to be "ECOFF".
1995-08-01* configure.in: Check for working mmap, ansi headers, string.h,J.T. Conklin1-2/+2
strings.h, and memory.h. * configure: Regenerated. * gdb_stat.h: New file, "portable" <sys/stat.h>. * gdb_string.h: New file, "portable" <string.h>. * altos-xdep.c, arm-tdep.c, arm-xdep.c, convex-tdep.c, convex-xdep.c, coredep.c, cxux-nat.c, dbxread.c, exec.c, gould-xdep.c, hppa-tdep.c, i386aix-nat.c, i386b-nat.c, i386mach-nat.c, i386v-nat.c, infptrace.c, m88k-nat.c, main.c, mdebugread.c, objfiles.c, os9kread.c, procfs.c, pyr-xdep.c, rs6000-nat.c, source.c, standalone.c, stuff.c, sun386-nat.c, symfile.c, symm-nat.c, symm-tdep.c, symtab.c, top.c, ultra3-nat.c, ultra3-xdep.c, umax-xdep.c, xcoffread.c: Include "gdb_stat.h" instead of <sys/stat.h>. * alpha-tdep.c, breakpoint.c, buildsym.c, c-typeprint.c, ch-typeprint.c, coffread.c, command.c, core-sol2.c, core-svr4.c, core.c, corelow.c, cp-valprint.c, dbxread.c, dcache.c, demangle.c, dpx2-nat.c, dstread.c, dwarfread.c, elfread.c, environ.c, eval.c, exec.c, f-lang.c, f-typeprint.c, f-valprint.c, findvar.c, fork-child.c, gdbtypes.c, hpread.c, i386-tdep.c, infcmd.c, inflow.c, infptrace.c, infrun.c, irix5-nat.c, language.c, m2-typeprint.c, main.c, mdebugread.c, minsyms.c, mipsread.c, monitor.c, nlmread.c, objfiles.c, os9kread.c, osfsolib.c, parse.c, printcmd.c, procfs.c, regex.c, remote-adapt.c, remote-arc.c, remote-array.c, remote-bug.c, remote-e7000.c, remote-eb.c, remote-es.c, remote-hms.c, remote-mm.c, remote-os9k.c, remote-pa.c, remote-sim.c, remote-st.c, remote-udi.c, remote-utils.c, remote-vx.c, remote-vx29k.c, remote-vx68.c, remote-vx960.c, remote-vxmips.c, remote-vxsparc.c, remote.c, solib.c, somread.c, source.c, stabsread.c, stack.c, symfile.c, symmisc.c, symtab.c, target.c, top.c, typeprint.c, utils.c, valarith.c, valops.c, valprint.c, values.c, xcoffread.c: Include "gdb_string.h" instead of <string.h>. * gdbtk.c: Likewise. * config/xm-sysv4.h, i386/xm-ptx.h, m68k/xm-sun3os4.h, sparc/xm-sun4os4.h (HAVE_MMAP): Removed. * config/xm-lynx.h, config/i386/xm-ptx.h, config/m68k/nm-apollo68b.h, config/m68k/xm-hp300hpux.h, config/mips/xm-irix3.h, config/mips/xm-mips.h, config/mips/xm-news-mips.h, config/mips/xm-riscos.h, config/pa/hppah.h, config/rs6000/xm-rs6000.h, config/sparc/xm-sun4os4.h, config/sparc/xm-sun4sol2.h, config/vax/xm-vaxbsd.h, config/vax/xm-vaxult.h, config/vax/xm-vaxult2.h (MEM_FNS_DECLARED): Removed. * config/mips/xm-irix3.h, config/mips/xm-mips.h, config/pa/xm-hppah.h (memcpy, memset): Removed declarations.
1995-07-31Oops, don't edit a file when your checkin hasn't finishedJ.T. Conklin1-1/+1
1995-07-31* configure.in: Check for unistd.h.J.T. Conklin1-22/+24
* configure: Regenerated. * command.c, cp-valprint.c, fork-child.c, i386-tdep.c, i386b-nat.c, inflow.c, main.c, maint.c, objfiles.c, solib.c, source.c, stack.c, symfile.c, top.c, utils.c: Include strings.h and/or unistd.h to bring prototypes into scope.
1995-04-08 * mdebugread.c (parse_symbol): Use new variablePeter Schauer1-42/+34
nodebug_var_symbol_type as type of variables which don't have any ecoff debug info associated with them. (parse_symbol, parse_procedure): Use heuristics to determine if functions were compiled without debugging info and change their type to nodebug_function_symbol_type. (_initialize_mdebugread): Initialize nodebug_*_symbol_type. * source.c (line_info): Clear sal.pc for `info line' without arguments.
1994-12-08 * source.c: Various cosmetic changes.Stan Shebs1-124/+218
(forward_search_command): Handle very long source lines correctly.
1994-05-13 gcc -Wall lint:Jim Kingdon1-9/+7
* breakpoint.c (watchpoint_check): Remove unused variable b. * stack.c (print_frame_info): Move sp and buf inside #if. * eval.c (evaluate_subexp): Remove unused variables pp, mangle_ptr, ptr, and mangle_tstr. * valarith.c (value_x_binop): Remove unused variables mangle_tstr and mangle_ptr. * symtab.c (lookup_symtab): Put variable copy inside #if. (decode_line_1): Put variable q1 inside #if 0. * target.h: Declare target_link. * infrun.c (wait_for_inferior): Remove unused variables signame. * remote.c (remote_resume): Remove unused variable name. * c-exp.y (parse_number): Parenthesize operand of shift. * dbxread.c (record_minimal_symbol): Parenthesize operand of && (this is a semantic change, the warning seems to have detected a bug). * dbxread.c (end_psymtab): Move variable p1 inside #if. * coffread.c: Move variable temptype inside #if. * ch-typeprint.c (chill_type_print_base): Remove unused variable name. * ch-valprint.c: #include typeprint.h and ch-lang.h. (chill_val_print): Remove unused variable in_range. (chill_val_print): Remove statement "length > TYPE_LENGTH (type);". (chill_val_print): Add default case for switch. * stabsread.h: Declare stabsect_build_psymtabs. * os9kread.c (read_minimal_symbols): Make this return void. (os9k_symfile_read): Remove unused variables stb_exist and val. (os9k_symfile_init): Remove unused variable val. (fill_sym): Remove unused variable id. (read_os9k_psymtab): Put variable back_to inside #if 0. Remove unused variable nsl. Remove unused variable symfile_bfd. #if 0 unused variables lbrac_unmatched_complaint and lbrac_mismatch_complaint. Remove declaration for non-existent function os9k_next_symbol_text. * annotate.c, annotate.h: New files, containing a function for each annotation which outputs it. * Move breakpoints_changed from breakpoint.c to annotate.c. * breakpoint.c, blockframe.c, infrun.c, cp-valprint.c, main.c, printcmd.c, source.c, stack.c, utils.c, valprint.c: Use annotate.c functions to output annotations. * Makefile.in (OBS): Add annotate.o.
1994-04-15Fri Apr 15 11:53:46 1994 Stan Shebs (shebs@andros.cygnus.com)Stan Shebs1-24/+38
* source.c (DIRNAME_SEPARATOR): New macro, replaces all references to : in search path processing. * defs.h (qsort): Rename argument in prototype. * symtab.h (SAYMBOL_VALUE): Rename value field, avoids bugs in some compilers. * breakpoint.c, exec.c, mdebugread.c, mipsread.c, xcoffexec.c (false): Eliminate usages.
1993-11-01Change the stream argument to _filtered to GDB_FILE *.Thomas Lord1-14/+23
Change all references to stdout/stderr to gdb_stdout/gdb_stderr. Replace all calls to stdio output functions with calls to corresponding _unfiltered functions (`fprintf_unfiltered') Replaced calls to fopen for output to gdb_fopen. Added sufficient goo to utils.c and defs.h to make the above work. The net effect is that stdio output functions are only directly used in utils.c. Elsewhere, the _unfiltered and _filtered functions and GDB_FILE type are used. In the near future, GDB_FILE will stop being equivalant to FILE. The semantics of some commands has changed in a very subtle way: called in the right context, they may cause new occurences of prompt_for_continue() behavior. The testsuite doesn't notice anything like this, though. Please respect this change by not reintroducing stdio output dependencies in the main body of gdb code. All output from commands should go to a GDB_FILE. Target-specific code can still use stdio directly to communicate with targets.
1993-07-12 * symtab.c (decode_line_1): Use end of block to figure out whetherJim Kingdon1-14/+44
val.end is in the same function, not minimal symbols. * source.c (line_info): Add a few more wrap_here's. * i386-tdep.c (i386_follow_jump): Do byteswapping where needed and don't make assumptions about sizes of host data types. * blockframe.c, symtab.h (find_pc_partial_function): New arg endaddr. * infrun.c, breakpoint.c, printcmd.c: Change callers. * printcmd.c (containing_function_bounds): Remove. * printcmd.c (disassemble_command): Use find_pc_partial_function, not containing_function_bounds. * infcmd.c (step_1): Use find_pc_partial_function rather than trying to roll our own. Move check for a pc between SIGTRAMP_START and SIGTRAMP_END in find_pc_partial_function, not step_1.
1993-05-26 * source.c (line_info): If we don't find a symtab, print more usefulJim Kingdon1-7/+20
output, including the symbolic address.
1993-05-26 * source.c (line_info): If --fullname, display the source.Jim Kingdon1-21/+32
(identify_source_line), callers: Take pc as argument, rather than assuming innermost frame (emacs doesn't use this, so no one ever noticed). * symtab.h: Declare frame_file_full_name. * main.c: Don't.