/* Parse expressions for GDB.
- Copyright (C) 1986, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996,
- 1997, 1998, 1999, 2000, 2001, 2004, 2005 Free Software Foundation, Inc.
+ Copyright (C) 1986, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
+ 1998, 1999, 2000, 2001, 2004, 2005, 2007 Free Software Foundation, Inc.
Modified from expread.y by the Department of Computer Science at the
State University of New York at Buffalo, 1991.
write_exp_elt_opcode (OP_LONG);
- if (SYMBOL_BFD_SECTION (msymbol)->flags & SEC_THREAD_LOCAL)
+ if (SYMBOL_BFD_SECTION (msymbol)
+ && SYMBOL_BFD_SECTION (msymbol)->flags & SEC_THREAD_LOCAL)
{
bfd *bfd = SYMBOL_BFD_SECTION (msymbol)->owner;
struct objfile *ofp;
/* Handle tokens that refer to machine registers:
$ followed by a register name. */
- i = frame_map_name_to_regnum (deprecated_selected_frame,
+ i = frame_map_name_to_regnum (deprecated_safe_get_selected_frame (),
str.ptr + 1, str.length - 1);
if (i >= 0)
goto handle_register;