]> git.pld-linux.org Git - packages/gdb.git/blob - gdb-ada-update4.patch
- remaining ada updates (from gdb CVS)
[packages/gdb.git] / gdb-ada-update4.patch
1 ===================================================================
2 RCS file: /cvs/src/src/gdb/ada-lang.h,v
3 retrieving revision 1.7
4 retrieving revision 1.8
5 diff -u -r1.7 -r1.8
6 --- gdb/ada-lang.h      2004/06/02 09:55:36     1.7
7 +++ gdb/ada-lang.h      2004/06/08 08:42:04     1.8
8 @@ -393,4 +393,15 @@
9  
10  extern void ada_reset_thread_registers (void);
11  
12 +/* Look up a symbol by name using the search conventions of 
13 +   a specific language (optional block, optional symtab). 
14 +   FIXME: Should be symtab.h. */
15 +
16 +extern struct symbol *lookup_symbol_in_language (const char *, 
17 +                                                const struct block *,
18 +                                                domain_enum, 
19 +                                                enum language,
20 +                                                int *,
21 +                                                struct symtab **);
22 +
23  #endif
24 ===================================================================
25 RCS file: /cvs/src/src/gdb/ada-lang.c,v
26 retrieving revision 1.36
27 retrieving revision 1.37
28 diff -u -r1.36 -r1.37
29 --- gdb/ada-lang.c      2004/06/02 09:55:36     1.36
30 +++ gdb/ada-lang.c      2004/06/08 08:42:03     1.37
31 @@ -4444,6 +4444,30 @@
32  #endif
33  }
34  
35 +/* FIXME: The next two routines belong in symtab.c */
36 +
37 +static void restore_language (void* lang)
38 +{
39 +  set_language ((enum language) lang);
40 +}
41 +
42 +/* As for lookup_symbol, but performed as if the current language 
43 +   were LANG. */
44 +
45 +struct symbol *
46 +lookup_symbol_in_language (const char *name, const struct block *block,
47 +                          domain_enum domain, enum language lang,
48 +                          int *is_a_field_of_this, struct symtab **symtab)
49 +{
50 +  struct cleanup *old_chain 
51 +    = make_cleanup (restore_language, (void*) current_language->la_language);
52 +  struct symbol *result;
53 +  set_language (lang);
54 +  result = lookup_symbol (name, block, domain, is_a_field_of_this, symtab);
55 +  do_cleanups (old_chain);
56 +  return result;
57 +}
58 +
59  /* True if TYPE is definitely an artificial type supplied to a symbol
60     for which no debugging information was given in the symbol file.  */
61  
This page took 0.067758 seconds and 4 git commands to generate.