Mon Apr 22 00:02:43 1991 Jim Kingdon (kingdon at cygint.cygnus.com)
+ * symfile.c (symbol_file_add): Add comment.
+ solib.c (solib_add): Don't malloc name passed to symbol_file_add.
+
+ * exec.c (build_section_table): If *start isn't NULL, free it.
+
+ * stack.c (parse_frame_specification): Error if NULL selected_frame.
+
+ * infcmd.c (finish_command): Error if NULL selected_frame.
+
+ * inflow.c (kill_command): Deal with NULL selected_frame.
+
+ * stack.c (record_selected_frame): Set *FRAMEP to NULL if there
+ is no selected frame.
+ infrun.c (restore_inferior_status): Add comment.
+
+ * findvar.c (read_var_value): Check for NULL frame where we need
+ a frame.
+
+ * breakpoint.c (get_catch_sals): Check for NULL selected_frame.
+
* breakpoint.c (bpstat_print): Try all elements on the bpstat
chain before giving up with an internal error.
#include "symtab.h"
#include "gdbcore.h"
#include "command.h"
+#include "target.h"
/*
** local data declarations
** Advance to next local abbreviated load_map structure
*/
if (!(inferior_lm = so_list_ptr->inferior_lm.lm_next)) {
- /*
- ** See if any were added
- */
- read_memory((CORE_ADDR)so_list_ptr->inferior_lm_add,
- &so_list_ptr->inferior_lm,
- sizeof(struct link_map));
- inferior_lm = so_list_ptr->inferior_lm.lm_next;
+ /* See if any were added, but be quiet if we can't read
+ from the target any more. */
+ int status;
+
+ status = target_read_memory (
+ (CORE_ADDR)so_list_ptr->inferior_lm_add,
+ &so_list_ptr->inferior_lm,
+ sizeof(struct link_map));
+ if (status == 0)
+ inferior_lm = so_list_ptr->inferior_lm.lm_next;
+ else
+ inferior_lm = 0;
}
so_list_next = so_list_ptr->next;
}
if (so->symbols_loaded) {
printf("Symbols already loaded for %s\n", so->inferior_so_name);
} else {
- /* File Name String Freed by processing */
- sz = strlen(so->inferior_so_name) + 1;
- val = (char *) xmalloc(sz);
- bcopy(so->inferior_so_name, val, sz);
- symbol_file_add (val, from_tty,
+ symbol_file_add (so->inferior_so_name, from_tty,
(unsigned int)so->inferior_lm.lm_addr, 0);
so->symbols_loaded = 1;
}
/* Process a symbol file, as either the main file or as a dynamically
loaded file.
- NAME is the file name (which will be tilde-expanded and made absolute
- herein). FROM_TTY says how verbose to be. MAINLINE specifies whether
- this is the main symbol file, or whether it's an extra symbol file
- such as dynamically loaded code. If !mainline, ADDR is the address
+ NAME is the file name (which will be tilde-expanded and made
+ absolute herein) (but we don't free or modify NAME itself).
+ FROM_TTY says how verbose to be. MAINLINE specifies whether this
+ is the main symbol file, or whether it's an extra symbol file such
+ as dynamically loaded code. If !mainline, ADDR is the address
where the text segment was loaded. */
void