2006-11-18 Pedro Alves <pedro_alves@portugalmail.pt>
authorDaniel Jacobowitz <drow@false.org>
Sat, 18 Nov 2006 23:54:32 +0000 (23:54 +0000)
committerDaniel Jacobowitz <drow@false.org>
Sat, 18 Nov 2006 23:54:32 +0000 (23:54 +0000)
* parse.c (write_exp_msymbol): Check SYMBOL_BFD_SECTION before
dereferencing it.

gdb/ChangeLog
gdb/parse.c

index 1ecd3683c4b4e6aea5693e3886c897659e5ce24d..7f7ea3727ddf2818a5df707b23d8f92190e71d1f 100644 (file)
@@ -1,3 +1,8 @@
+2006-11-18  Pedro Alves  <pedro_alves@portugalmail.pt>
+
+       * parse.c (write_exp_msymbol): Check SYMBOL_BFD_SECTION before
+       dereferencing it.
+
 2006-11-17  Daniel Jacobowitz  <dan@codesourcery.com>
 
        * utils.c (string_to_core_addr): Use error instead of
index b0edaf426614b7f3ef980b727693ba07201581de..5f23120ccba459361de9f88034a7012c294bb74c 100644 (file)
@@ -408,7 +408,8 @@ write_exp_msymbol (struct minimal_symbol *msymbol,
 
   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;