/* Memory-access and commands for "inferior" process, for GDB.
- Copyright 1986, 1987, 1988, 1989, 1991, 1992, 1995 Free Software Foundation, Inc.
+ Copyright 1986, 1987, 1988, 1989, 1991, 1992, 1995, 1996 Free Software Foundation, Inc.
This file is part of GDB.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "defs.h"
#include <signal.h>
val = value_being_returned (value_type, stop_registers,
using_struct_return (value_of_variable (function, NULL),
funcaddr,
- value_type,
+ check_typedef (value_type),
BLOCK_GCC_COMPILED (SYMBOL_BLOCK_VALUE (function))));
printf_filtered ("Value returned is $%d = ", record_latest_value (val));
int from_tty;
{
char *exec_path;
-
+ char *env;
dont_repeat ();
- exec_path = strsave (get_in_environ (inferior_environ, path_var_name));
+ env = get_in_environ (inferior_environ, path_var_name);
+ /* Can be null if path is not set */
+ if (!env)
+ env = "";
+ exec_path = strsave (env);
mod_path (dirname, &exec_path);
set_in_environ (inferior_environ, path_var_name, exec_path);
free (exec_path);
continue;
}
+ /* If the register name is empty, it is undefined for this
+ processor, so don't display anything. */
+ if (reg_names[i] == NULL || *(reg_names[i]) == '\0')
+ continue;
+
fputs_filtered (reg_names[i], gdb_stdout);
print_spaces_filtered (15 - strlen (reg_names[i]), gdb_stdout);
/* Else if virtual format is too long for printf,
print in hex a byte at a time. */
- else if (REGISTER_VIRTUAL_SIZE (i) > sizeof (long))
+ else if (REGISTER_VIRTUAL_SIZE (i) > (int) sizeof (long))
{
register int j;
printf_filtered ("0x");
if (!target_has_registers)
error ("The program has no registers now.");
+ if (selected_frame == NULL)
+ error ("No selected frame.");
if (!addr_exp)
{
char *args;
int from_tty;
{
+ extern int auto_solib_add;
+
dont_repeat (); /* Not for the faint of heart */
if (target_has_execution)
#endif
#ifdef SOLIB_ADD
- /* Add shared library symbols from the newly attached process, if any. */
- SOLIB_ADD ((char *)0, from_tty, (struct target_ops *)0);
+ if (auto_solib_add)
+ {
+ /* Add shared library symbols from the newly attached process, if any. */
+ SOLIB_ADD ((char *)0, from_tty, (struct target_ops *)0);
+ re_enable_breakpoints_in_shlibs ();
+ }
#endif
normal_stop ();