2004-06-06 Randolph Chung <tausq@debian.org>
[deliverable/binutils-gdb.git] / gdb / hppa-hpux-tdep.c
1 /* Target-dependent code for HPUX running on PA-RISC, for GDB.
2
3 Copyright 2002, 2003 Free Software Foundation, Inc.
4
5 This file is part of GDB.
6
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
11
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
20
21 #include "defs.h"
22 #include "arch-utils.h"
23 #include "gdbcore.h"
24 #include "osabi.h"
25 #include "gdb_string.h"
26 #include "frame.h"
27 #include "frame-unwind.h"
28 #include "trad-frame.h"
29 #include "symtab.h"
30 #include "objfiles.h"
31 #include "inferior.h"
32 #include "infcall.h"
33 #include "hppa-tdep.h"
34
35 #include <dl.h>
36 #include <machine/save_state.h>
37
38 #ifndef offsetof
39 #define offsetof(TYPE, MEMBER) ((unsigned long) &((TYPE *)0)->MEMBER)
40 #endif
41
42 /* Forward declarations. */
43 extern void _initialize_hppa_hpux_tdep (void);
44 extern initialize_file_ftype _initialize_hppa_hpux_tdep;
45
46 typedef struct
47 {
48 struct minimal_symbol *msym;
49 CORE_ADDR solib_handle;
50 CORE_ADDR return_val;
51 }
52 args_for_find_stub;
53
54 /* Return one if PC is in the call path of a trampoline, else return zero.
55
56 Note we return one for *any* call trampoline (long-call, arg-reloc), not
57 just shared library trampolines (import, export). */
58
59 static int
60 hppa32_hpux_in_solib_call_trampoline (CORE_ADDR pc, char *name)
61 {
62 struct minimal_symbol *minsym;
63 struct unwind_table_entry *u;
64
65 /* First see if PC is in one of the two C-library trampolines. */
66 if (pc == hppa_symbol_address("$$dyncall")
67 || pc == hppa_symbol_address("_sr4export"))
68 return 1;
69
70 minsym = lookup_minimal_symbol_by_pc (pc);
71 if (minsym && strcmp (DEPRECATED_SYMBOL_NAME (minsym), ".stub") == 0)
72 return 1;
73
74 /* Get the unwind descriptor corresponding to PC, return zero
75 if no unwind was found. */
76 u = find_unwind_entry (pc);
77 if (!u)
78 return 0;
79
80 /* If this isn't a linker stub, then return now. */
81 if (u->stub_unwind.stub_type == 0)
82 return 0;
83
84 /* By definition a long-branch stub is a call stub. */
85 if (u->stub_unwind.stub_type == LONG_BRANCH)
86 return 1;
87
88 /* The call and return path execute the same instructions within
89 an IMPORT stub! So an IMPORT stub is both a call and return
90 trampoline. */
91 if (u->stub_unwind.stub_type == IMPORT)
92 return 1;
93
94 /* Parameter relocation stubs always have a call path and may have a
95 return path. */
96 if (u->stub_unwind.stub_type == PARAMETER_RELOCATION
97 || u->stub_unwind.stub_type == EXPORT)
98 {
99 CORE_ADDR addr;
100
101 /* Search forward from the current PC until we hit a branch
102 or the end of the stub. */
103 for (addr = pc; addr <= u->region_end; addr += 4)
104 {
105 unsigned long insn;
106
107 insn = read_memory_integer (addr, 4);
108
109 /* Does it look like a bl? If so then it's the call path, if
110 we find a bv or be first, then we're on the return path. */
111 if ((insn & 0xfc00e000) == 0xe8000000)
112 return 1;
113 else if ((insn & 0xfc00e001) == 0xe800c000
114 || (insn & 0xfc000000) == 0xe0000000)
115 return 0;
116 }
117
118 /* Should never happen. */
119 warning ("Unable to find branch in parameter relocation stub.\n");
120 return 0;
121 }
122
123 /* Unknown stub type. For now, just return zero. */
124 return 0;
125 }
126
127 static int
128 hppa64_hpux_in_solib_call_trampoline (CORE_ADDR pc, char *name)
129 {
130 /* PA64 has a completely different stub/trampoline scheme. Is it
131 better? Maybe. It's certainly harder to determine with any
132 certainty that we are in a stub because we can not refer to the
133 unwinders to help.
134
135 The heuristic is simple. Try to lookup the current PC value in th
136 minimal symbol table. If that fails, then assume we are not in a
137 stub and return.
138
139 Then see if the PC value falls within the section bounds for the
140 section containing the minimal symbol we found in the first
141 step. If it does, then assume we are not in a stub and return.
142
143 Finally peek at the instructions to see if they look like a stub. */
144 struct minimal_symbol *minsym;
145 asection *sec;
146 CORE_ADDR addr;
147 int insn, i;
148
149 minsym = lookup_minimal_symbol_by_pc (pc);
150 if (! minsym)
151 return 0;
152
153 sec = SYMBOL_BFD_SECTION (minsym);
154
155 if (bfd_get_section_vma (sec->owner, sec) <= pc
156 && pc < (bfd_get_section_vma (sec->owner, sec)
157 + bfd_section_size (sec->owner, sec)))
158 return 0;
159
160 /* We might be in a stub. Peek at the instructions. Stubs are 3
161 instructions long. */
162 insn = read_memory_integer (pc, 4);
163
164 /* Find out where we think we are within the stub. */
165 if ((insn & 0xffffc00e) == 0x53610000)
166 addr = pc;
167 else if ((insn & 0xffffffff) == 0xe820d000)
168 addr = pc - 4;
169 else if ((insn & 0xffffc00e) == 0x537b0000)
170 addr = pc - 8;
171 else
172 return 0;
173
174 /* Now verify each insn in the range looks like a stub instruction. */
175 insn = read_memory_integer (addr, 4);
176 if ((insn & 0xffffc00e) != 0x53610000)
177 return 0;
178
179 /* Now verify each insn in the range looks like a stub instruction. */
180 insn = read_memory_integer (addr + 4, 4);
181 if ((insn & 0xffffffff) != 0xe820d000)
182 return 0;
183
184 /* Now verify each insn in the range looks like a stub instruction. */
185 insn = read_memory_integer (addr + 8, 4);
186 if ((insn & 0xffffc00e) != 0x537b0000)
187 return 0;
188
189 /* Looks like a stub. */
190 return 1;
191 }
192
193 /* Return one if PC is in the return path of a trampoline, else return zero.
194
195 Note we return one for *any* call trampoline (long-call, arg-reloc), not
196 just shared library trampolines (import, export). */
197
198 static int
199 hppa_hpux_in_solib_return_trampoline (CORE_ADDR pc, char *name)
200 {
201 struct unwind_table_entry *u;
202
203 /* Get the unwind descriptor corresponding to PC, return zero
204 if no unwind was found. */
205 u = find_unwind_entry (pc);
206 if (!u)
207 return 0;
208
209 /* If this isn't a linker stub or it's just a long branch stub, then
210 return zero. */
211 if (u->stub_unwind.stub_type == 0 || u->stub_unwind.stub_type == LONG_BRANCH)
212 return 0;
213
214 /* The call and return path execute the same instructions within
215 an IMPORT stub! So an IMPORT stub is both a call and return
216 trampoline. */
217 if (u->stub_unwind.stub_type == IMPORT)
218 return 1;
219
220 /* Parameter relocation stubs always have a call path and may have a
221 return path. */
222 if (u->stub_unwind.stub_type == PARAMETER_RELOCATION
223 || u->stub_unwind.stub_type == EXPORT)
224 {
225 CORE_ADDR addr;
226
227 /* Search forward from the current PC until we hit a branch
228 or the end of the stub. */
229 for (addr = pc; addr <= u->region_end; addr += 4)
230 {
231 unsigned long insn;
232
233 insn = read_memory_integer (addr, 4);
234
235 /* Does it look like a bl? If so then it's the call path, if
236 we find a bv or be first, then we're on the return path. */
237 if ((insn & 0xfc00e000) == 0xe8000000)
238 return 0;
239 else if ((insn & 0xfc00e001) == 0xe800c000
240 || (insn & 0xfc000000) == 0xe0000000)
241 return 1;
242 }
243
244 /* Should never happen. */
245 warning ("Unable to find branch in parameter relocation stub.\n");
246 return 0;
247 }
248
249 /* Unknown stub type. For now, just return zero. */
250 return 0;
251
252 }
253
254 /* Figure out if PC is in a trampoline, and if so find out where
255 the trampoline will jump to. If not in a trampoline, return zero.
256
257 Simple code examination probably is not a good idea since the code
258 sequences in trampolines can also appear in user code.
259
260 We use unwinds and information from the minimal symbol table to
261 determine when we're in a trampoline. This won't work for ELF
262 (yet) since it doesn't create stub unwind entries. Whether or
263 not ELF will create stub unwinds or normal unwinds for linker
264 stubs is still being debated.
265
266 This should handle simple calls through dyncall or sr4export,
267 long calls, argument relocation stubs, and dyncall/sr4export
268 calling an argument relocation stub. It even handles some stubs
269 used in dynamic executables. */
270
271 static CORE_ADDR
272 hppa_hpux_skip_trampoline_code (CORE_ADDR pc)
273 {
274 long orig_pc = pc;
275 long prev_inst, curr_inst, loc;
276 struct minimal_symbol *msym;
277 struct unwind_table_entry *u;
278
279 /* Addresses passed to dyncall may *NOT* be the actual address
280 of the function. So we may have to do something special. */
281 if (pc == hppa_symbol_address("$$dyncall"))
282 {
283 pc = (CORE_ADDR) read_register (22);
284
285 /* If bit 30 (counting from the left) is on, then pc is the address of
286 the PLT entry for this function, not the address of the function
287 itself. Bit 31 has meaning too, but only for MPE. */
288 if (pc & 0x2)
289 pc = (CORE_ADDR) read_memory_integer (pc & ~0x3, TARGET_PTR_BIT / 8);
290 }
291 if (pc == hppa_symbol_address("$$dyncall_external"))
292 {
293 pc = (CORE_ADDR) read_register (22);
294 pc = (CORE_ADDR) read_memory_integer (pc & ~0x3, TARGET_PTR_BIT / 8);
295 }
296 else if (pc == hppa_symbol_address("_sr4export"))
297 pc = (CORE_ADDR) (read_register (22));
298
299 /* Get the unwind descriptor corresponding to PC, return zero
300 if no unwind was found. */
301 u = find_unwind_entry (pc);
302 if (!u)
303 return 0;
304
305 /* If this isn't a linker stub, then return now. */
306 /* elz: attention here! (FIXME) because of a compiler/linker
307 error, some stubs which should have a non zero stub_unwind.stub_type
308 have unfortunately a value of zero. So this function would return here
309 as if we were not in a trampoline. To fix this, we go look at the partial
310 symbol information, which reports this guy as a stub.
311 (FIXME): Unfortunately, we are not that lucky: it turns out that the
312 partial symbol information is also wrong sometimes. This is because
313 when it is entered (somread.c::som_symtab_read()) it can happen that
314 if the type of the symbol (from the som) is Entry, and the symbol is
315 in a shared library, then it can also be a trampoline. This would
316 be OK, except that I believe the way they decide if we are ina shared library
317 does not work. SOOOO..., even if we have a regular function w/o trampolines
318 its minimal symbol can be assigned type mst_solib_trampoline.
319 Also, if we find that the symbol is a real stub, then we fix the unwind
320 descriptor, and define the stub type to be EXPORT.
321 Hopefully this is correct most of the times. */
322 if (u->stub_unwind.stub_type == 0)
323 {
324
325 /* elz: NOTE (FIXME!) once the problem with the unwind information is fixed
326 we can delete all the code which appears between the lines */
327 /*--------------------------------------------------------------------------*/
328 msym = lookup_minimal_symbol_by_pc (pc);
329
330 if (msym == NULL || MSYMBOL_TYPE (msym) != mst_solib_trampoline)
331 return orig_pc == pc ? 0 : pc & ~0x3;
332
333 else if (msym != NULL && MSYMBOL_TYPE (msym) == mst_solib_trampoline)
334 {
335 struct objfile *objfile;
336 struct minimal_symbol *msymbol;
337 int function_found = 0;
338
339 /* go look if there is another minimal symbol with the same name as
340 this one, but with type mst_text. This would happen if the msym
341 is an actual trampoline, in which case there would be another
342 symbol with the same name corresponding to the real function */
343
344 ALL_MSYMBOLS (objfile, msymbol)
345 {
346 if (MSYMBOL_TYPE (msymbol) == mst_text
347 && DEPRECATED_STREQ (DEPRECATED_SYMBOL_NAME (msymbol), DEPRECATED_SYMBOL_NAME (msym)))
348 {
349 function_found = 1;
350 break;
351 }
352 }
353
354 if (function_found)
355 /* the type of msym is correct (mst_solib_trampoline), but
356 the unwind info is wrong, so set it to the correct value */
357 u->stub_unwind.stub_type = EXPORT;
358 else
359 /* the stub type info in the unwind is correct (this is not a
360 trampoline), but the msym type information is wrong, it
361 should be mst_text. So we need to fix the msym, and also
362 get out of this function */
363 {
364 MSYMBOL_TYPE (msym) = mst_text;
365 return orig_pc == pc ? 0 : pc & ~0x3;
366 }
367 }
368
369 /*--------------------------------------------------------------------------*/
370 }
371
372 /* It's a stub. Search for a branch and figure out where it goes.
373 Note we have to handle multi insn branch sequences like ldil;ble.
374 Most (all?) other branches can be determined by examining the contents
375 of certain registers and the stack. */
376
377 loc = pc;
378 curr_inst = 0;
379 prev_inst = 0;
380 while (1)
381 {
382 /* Make sure we haven't walked outside the range of this stub. */
383 if (u != find_unwind_entry (loc))
384 {
385 warning ("Unable to find branch in linker stub");
386 return orig_pc == pc ? 0 : pc & ~0x3;
387 }
388
389 prev_inst = curr_inst;
390 curr_inst = read_memory_integer (loc, 4);
391
392 /* Does it look like a branch external using %r1? Then it's the
393 branch from the stub to the actual function. */
394 if ((curr_inst & 0xffe0e000) == 0xe0202000)
395 {
396 /* Yup. See if the previous instruction loaded
397 a value into %r1. If so compute and return the jump address. */
398 if ((prev_inst & 0xffe00000) == 0x20200000)
399 return (hppa_extract_21 (prev_inst) + hppa_extract_17 (curr_inst)) & ~0x3;
400 else
401 {
402 warning ("Unable to find ldil X,%%r1 before ble Y(%%sr4,%%r1).");
403 return orig_pc == pc ? 0 : pc & ~0x3;
404 }
405 }
406
407 /* Does it look like a be 0(sr0,%r21)? OR
408 Does it look like a be, n 0(sr0,%r21)? OR
409 Does it look like a bve (r21)? (this is on PA2.0)
410 Does it look like a bve, n(r21)? (this is also on PA2.0)
411 That's the branch from an
412 import stub to an export stub.
413
414 It is impossible to determine the target of the branch via
415 simple examination of instructions and/or data (consider
416 that the address in the plabel may be the address of the
417 bind-on-reference routine in the dynamic loader).
418
419 So we have try an alternative approach.
420
421 Get the name of the symbol at our current location; it should
422 be a stub symbol with the same name as the symbol in the
423 shared library.
424
425 Then lookup a minimal symbol with the same name; we should
426 get the minimal symbol for the target routine in the shared
427 library as those take precedence of import/export stubs. */
428 if ((curr_inst == 0xe2a00000) ||
429 (curr_inst == 0xe2a00002) ||
430 (curr_inst == 0xeaa0d000) ||
431 (curr_inst == 0xeaa0d002))
432 {
433 struct minimal_symbol *stubsym, *libsym;
434
435 stubsym = lookup_minimal_symbol_by_pc (loc);
436 if (stubsym == NULL)
437 {
438 warning ("Unable to find symbol for 0x%lx", loc);
439 return orig_pc == pc ? 0 : pc & ~0x3;
440 }
441
442 libsym = lookup_minimal_symbol (DEPRECATED_SYMBOL_NAME (stubsym), NULL, NULL);
443 if (libsym == NULL)
444 {
445 warning ("Unable to find library symbol for %s\n",
446 DEPRECATED_SYMBOL_NAME (stubsym));
447 return orig_pc == pc ? 0 : pc & ~0x3;
448 }
449
450 return SYMBOL_VALUE (libsym);
451 }
452
453 /* Does it look like bl X,%rp or bl X,%r0? Another way to do a
454 branch from the stub to the actual function. */
455 /*elz */
456 else if ((curr_inst & 0xffe0e000) == 0xe8400000
457 || (curr_inst & 0xffe0e000) == 0xe8000000
458 || (curr_inst & 0xffe0e000) == 0xe800A000)
459 return (loc + hppa_extract_17 (curr_inst) + 8) & ~0x3;
460
461 /* Does it look like bv (rp)? Note this depends on the
462 current stack pointer being the same as the stack
463 pointer in the stub itself! This is a branch on from the
464 stub back to the original caller. */
465 /*else if ((curr_inst & 0xffe0e000) == 0xe840c000) */
466 else if ((curr_inst & 0xffe0f000) == 0xe840c000)
467 {
468 /* Yup. See if the previous instruction loaded
469 rp from sp - 8. */
470 if (prev_inst == 0x4bc23ff1)
471 return (read_memory_integer
472 (read_register (HPPA_SP_REGNUM) - 8, 4)) & ~0x3;
473 else
474 {
475 warning ("Unable to find restore of %%rp before bv (%%rp).");
476 return orig_pc == pc ? 0 : pc & ~0x3;
477 }
478 }
479
480 /* elz: added this case to capture the new instruction
481 at the end of the return part of an export stub used by
482 the PA2.0: BVE, n (rp) */
483 else if ((curr_inst & 0xffe0f000) == 0xe840d000)
484 {
485 return (read_memory_integer
486 (read_register (HPPA_SP_REGNUM) - 24, TARGET_PTR_BIT / 8)) & ~0x3;
487 }
488
489 /* What about be,n 0(sr0,%rp)? It's just another way we return to
490 the original caller from the stub. Used in dynamic executables. */
491 else if (curr_inst == 0xe0400002)
492 {
493 /* The value we jump to is sitting in sp - 24. But that's
494 loaded several instructions before the be instruction.
495 I guess we could check for the previous instruction being
496 mtsp %r1,%sr0 if we want to do sanity checking. */
497 return (read_memory_integer
498 (read_register (HPPA_SP_REGNUM) - 24, TARGET_PTR_BIT / 8)) & ~0x3;
499 }
500
501 /* Haven't found the branch yet, but we're still in the stub.
502 Keep looking. */
503 loc += 4;
504 }
505 }
506
507
508 /* Exception handling support for the HP-UX ANSI C++ compiler.
509 The compiler (aCC) provides a callback for exception events;
510 GDB can set a breakpoint on this callback and find out what
511 exception event has occurred. */
512
513 /* The name of the hook to be set to point to the callback function */
514 static char HP_ACC_EH_notify_hook[] = "__eh_notify_hook";
515 /* The name of the function to be used to set the hook value */
516 static char HP_ACC_EH_set_hook_value[] = "__eh_set_hook_value";
517 /* The name of the callback function in end.o */
518 static char HP_ACC_EH_notify_callback[] = "__d_eh_notify_callback";
519 /* Name of function in end.o on which a break is set (called by above) */
520 static char HP_ACC_EH_break[] = "__d_eh_break";
521 /* Name of flag (in end.o) that enables catching throws */
522 static char HP_ACC_EH_catch_throw[] = "__d_eh_catch_throw";
523 /* Name of flag (in end.o) that enables catching catching */
524 static char HP_ACC_EH_catch_catch[] = "__d_eh_catch_catch";
525 /* The enum used by aCC */
526 typedef enum
527 {
528 __EH_NOTIFY_THROW,
529 __EH_NOTIFY_CATCH
530 }
531 __eh_notification;
532
533 /* Is exception-handling support available with this executable? */
534 static int hp_cxx_exception_support = 0;
535 /* Has the initialize function been run? */
536 int hp_cxx_exception_support_initialized = 0;
537 /* Address of __eh_notify_hook */
538 static CORE_ADDR eh_notify_hook_addr = 0;
539 /* Address of __d_eh_notify_callback */
540 static CORE_ADDR eh_notify_callback_addr = 0;
541 /* Address of __d_eh_break */
542 static CORE_ADDR eh_break_addr = 0;
543 /* Address of __d_eh_catch_catch */
544 static CORE_ADDR eh_catch_catch_addr = 0;
545 /* Address of __d_eh_catch_throw */
546 static CORE_ADDR eh_catch_throw_addr = 0;
547 /* Sal for __d_eh_break */
548 static struct symtab_and_line *break_callback_sal = 0;
549
550 /* Code in end.c expects __d_pid to be set in the inferior,
551 otherwise __d_eh_notify_callback doesn't bother to call
552 __d_eh_break! So we poke the pid into this symbol
553 ourselves.
554 0 => success
555 1 => failure */
556 int
557 setup_d_pid_in_inferior (void)
558 {
559 CORE_ADDR anaddr;
560 struct minimal_symbol *msymbol;
561 char buf[4]; /* FIXME 32x64? */
562
563 /* Slam the pid of the process into __d_pid; failing is only a warning! */
564 msymbol = lookup_minimal_symbol ("__d_pid", NULL, symfile_objfile);
565 if (msymbol == NULL)
566 {
567 warning ("Unable to find __d_pid symbol in object file.");
568 warning ("Suggest linking executable with -g (links in /opt/langtools/lib/end.o).");
569 return 1;
570 }
571
572 anaddr = SYMBOL_VALUE_ADDRESS (msymbol);
573 store_unsigned_integer (buf, 4, PIDGET (inferior_ptid)); /* FIXME 32x64? */
574 if (target_write_memory (anaddr, buf, 4)) /* FIXME 32x64? */
575 {
576 warning ("Unable to write __d_pid");
577 warning ("Suggest linking executable with -g (links in /opt/langtools/lib/end.o).");
578 return 1;
579 }
580 return 0;
581 }
582
583 /* elz: Used to lookup a symbol in the shared libraries.
584 This function calls shl_findsym, indirectly through a
585 call to __d_shl_get. __d_shl_get is in end.c, which is always
586 linked in by the hp compilers/linkers.
587 The call to shl_findsym cannot be made directly because it needs
588 to be active in target address space.
589 inputs: - minimal symbol pointer for the function we want to look up
590 - address in target space of the descriptor for the library
591 where we want to look the symbol up.
592 This address is retrieved using the
593 som_solib_get_solib_by_pc function (somsolib.c).
594 output: - real address in the library of the function.
595 note: the handle can be null, in which case shl_findsym will look for
596 the symbol in all the loaded shared libraries.
597 files to look at if you need reference on this stuff:
598 dld.c, dld_shl_findsym.c
599 end.c
600 man entry for shl_findsym */
601
602 CORE_ADDR
603 find_stub_with_shl_get (struct minimal_symbol *function, CORE_ADDR handle)
604 {
605 struct symbol *get_sym, *symbol2;
606 struct minimal_symbol *buff_minsym, *msymbol;
607 struct type *ftype;
608 struct value **args;
609 struct value *funcval;
610 struct value *val;
611
612 int x, namelen, err_value, tmp = -1;
613 CORE_ADDR endo_buff_addr, value_return_addr, errno_return_addr;
614 CORE_ADDR stub_addr;
615
616
617 args = alloca (sizeof (struct value *) * 8); /* 6 for the arguments and one null one??? */
618 funcval = find_function_in_inferior ("__d_shl_get");
619 get_sym = lookup_symbol ("__d_shl_get", NULL, VAR_DOMAIN, NULL, NULL);
620 buff_minsym = lookup_minimal_symbol ("__buffer", NULL, NULL);
621 msymbol = lookup_minimal_symbol ("__shldp", NULL, NULL);
622 symbol2 = lookup_symbol ("__shldp", NULL, VAR_DOMAIN, NULL, NULL);
623 endo_buff_addr = SYMBOL_VALUE_ADDRESS (buff_minsym);
624 namelen = strlen (DEPRECATED_SYMBOL_NAME (function));
625 value_return_addr = endo_buff_addr + namelen;
626 ftype = check_typedef (SYMBOL_TYPE (get_sym));
627
628 /* do alignment */
629 if ((x = value_return_addr % 64) != 0)
630 value_return_addr = value_return_addr + 64 - x;
631
632 errno_return_addr = value_return_addr + 64;
633
634
635 /* set up stuff needed by __d_shl_get in buffer in end.o */
636
637 target_write_memory (endo_buff_addr, DEPRECATED_SYMBOL_NAME (function), namelen);
638
639 target_write_memory (value_return_addr, (char *) &tmp, 4);
640
641 target_write_memory (errno_return_addr, (char *) &tmp, 4);
642
643 target_write_memory (SYMBOL_VALUE_ADDRESS (msymbol),
644 (char *) &handle, 4);
645
646 /* now prepare the arguments for the call */
647
648 args[0] = value_from_longest (TYPE_FIELD_TYPE (ftype, 0), 12);
649 args[1] = value_from_pointer (TYPE_FIELD_TYPE (ftype, 1), SYMBOL_VALUE_ADDRESS (msymbol));
650 args[2] = value_from_pointer (TYPE_FIELD_TYPE (ftype, 2), endo_buff_addr);
651 args[3] = value_from_longest (TYPE_FIELD_TYPE (ftype, 3), TYPE_PROCEDURE);
652 args[4] = value_from_pointer (TYPE_FIELD_TYPE (ftype, 4), value_return_addr);
653 args[5] = value_from_pointer (TYPE_FIELD_TYPE (ftype, 5), errno_return_addr);
654
655 /* now call the function */
656
657 val = call_function_by_hand (funcval, 6, args);
658
659 /* now get the results */
660
661 target_read_memory (errno_return_addr, (char *) &err_value, sizeof (err_value));
662
663 target_read_memory (value_return_addr, (char *) &stub_addr, sizeof (stub_addr));
664 if (stub_addr <= 0)
665 error ("call to __d_shl_get failed, error code is %d", err_value);
666
667 return (stub_addr);
668 }
669
670 /* Cover routine for find_stub_with_shl_get to pass to catch_errors */
671 static int
672 cover_find_stub_with_shl_get (void *args_untyped)
673 {
674 args_for_find_stub *args = args_untyped;
675 args->return_val = find_stub_with_shl_get (args->msym, args->solib_handle);
676 return 0;
677 }
678
679 /* Initialize exception catchpoint support by looking for the
680 necessary hooks/callbacks in end.o, etc., and set the hook value to
681 point to the required debug function
682
683 Return 0 => failure
684 1 => success */
685
686 static int
687 initialize_hp_cxx_exception_support (void)
688 {
689 struct symtabs_and_lines sals;
690 struct cleanup *old_chain;
691 struct cleanup *canonical_strings_chain = NULL;
692 int i;
693 char *addr_start;
694 char *addr_end = NULL;
695 char **canonical = (char **) NULL;
696 int thread = -1;
697 struct symbol *sym = NULL;
698 struct minimal_symbol *msym = NULL;
699 struct objfile *objfile;
700 asection *shlib_info;
701
702 /* Detect and disallow recursion. On HP-UX with aCC, infinite
703 recursion is a possibility because finding the hook for exception
704 callbacks involves making a call in the inferior, which means
705 re-inserting breakpoints which can re-invoke this code */
706
707 static int recurse = 0;
708 if (recurse > 0)
709 {
710 hp_cxx_exception_support_initialized = 0;
711 deprecated_exception_support_initialized = 0;
712 return 0;
713 }
714
715 hp_cxx_exception_support = 0;
716
717 /* First check if we have seen any HP compiled objects; if not,
718 it is very unlikely that HP's idiosyncratic callback mechanism
719 for exception handling debug support will be available!
720 This will percolate back up to breakpoint.c, where our callers
721 will decide to try the g++ exception-handling support instead. */
722 if (!deprecated_hp_som_som_object_present)
723 return 0;
724
725 /* We have a SOM executable with SOM debug info; find the hooks */
726
727 /* First look for the notify hook provided by aCC runtime libs */
728 /* If we find this symbol, we conclude that the executable must
729 have HP aCC exception support built in. If this symbol is not
730 found, even though we're a HP SOM-SOM file, we may have been
731 built with some other compiler (not aCC). This results percolates
732 back up to our callers in breakpoint.c which can decide to
733 try the g++ style of exception support instead.
734 If this symbol is found but the other symbols we require are
735 not found, there is something weird going on, and g++ support
736 should *not* be tried as an alternative.
737
738 ASSUMPTION: Only HP aCC code will have __eh_notify_hook defined.
739 ASSUMPTION: HP aCC and g++ modules cannot be linked together. */
740
741 /* libCsup has this hook; it'll usually be non-debuggable */
742 msym = lookup_minimal_symbol (HP_ACC_EH_notify_hook, NULL, NULL);
743 if (msym)
744 {
745 eh_notify_hook_addr = SYMBOL_VALUE_ADDRESS (msym);
746 hp_cxx_exception_support = 1;
747 }
748 else
749 {
750 warning ("Unable to find exception callback hook (%s).", HP_ACC_EH_notify_hook);
751 warning ("Executable may not have been compiled debuggable with HP aCC.");
752 warning ("GDB will be unable to intercept exception events.");
753 eh_notify_hook_addr = 0;
754 hp_cxx_exception_support = 0;
755 return 0;
756 }
757
758 /* Next look for the notify callback routine in end.o */
759 /* This is always available in the SOM symbol dictionary if end.o is linked in */
760 msym = lookup_minimal_symbol (HP_ACC_EH_notify_callback, NULL, NULL);
761 if (msym)
762 {
763 eh_notify_callback_addr = SYMBOL_VALUE_ADDRESS (msym);
764 hp_cxx_exception_support = 1;
765 }
766 else
767 {
768 warning ("Unable to find exception callback routine (%s).", HP_ACC_EH_notify_callback);
769 warning ("Suggest linking executable with -g (links in /opt/langtools/lib/end.o).");
770 warning ("GDB will be unable to intercept exception events.");
771 eh_notify_callback_addr = 0;
772 return 0;
773 }
774
775 #ifndef GDB_TARGET_IS_HPPA_20W
776 /* Check whether the executable is dynamically linked or archive bound */
777 /* With an archive-bound executable we can use the raw addresses we find
778 for the callback function, etc. without modification. For an executable
779 with shared libraries, we have to do more work to find the plabel, which
780 can be the target of a call through $$dyncall from the aCC runtime support
781 library (libCsup) which is linked shared by default by aCC. */
782 /* This test below was copied from somsolib.c/somread.c. It may not be a very
783 reliable one to test that an executable is linked shared. pai/1997-07-18 */
784 shlib_info = bfd_get_section_by_name (symfile_objfile->obfd, "$SHLIB_INFO$");
785 if (shlib_info && (bfd_section_size (symfile_objfile->obfd, shlib_info) != 0))
786 {
787 /* The minsym we have has the local code address, but that's not the
788 plabel that can be used by an inter-load-module call. */
789 /* Find solib handle for main image (which has end.o), and use that
790 and the min sym as arguments to __d_shl_get() (which does the equivalent
791 of shl_findsym()) to find the plabel. */
792
793 args_for_find_stub args;
794 static char message[] = "Error while finding exception callback hook:\n";
795
796 args.solib_handle = som_solib_get_solib_by_pc (eh_notify_callback_addr);
797 args.msym = msym;
798 args.return_val = 0;
799
800 recurse++;
801 catch_errors (cover_find_stub_with_shl_get, &args, message,
802 RETURN_MASK_ALL);
803 eh_notify_callback_addr = args.return_val;
804 recurse--;
805
806 deprecated_exception_catchpoints_are_fragile = 1;
807
808 if (!eh_notify_callback_addr)
809 {
810 /* We can get here either if there is no plabel in the export list
811 for the main image, or if something strange happened (?) */
812 warning ("Couldn't find a plabel (indirect function label) for the exception callback.");
813 warning ("GDB will not be able to intercept exception events.");
814 return 0;
815 }
816 }
817 else
818 deprecated_exception_catchpoints_are_fragile = 0;
819 #endif
820
821 /* Now, look for the breakpointable routine in end.o */
822 /* This should also be available in the SOM symbol dict. if end.o linked in */
823 msym = lookup_minimal_symbol (HP_ACC_EH_break, NULL, NULL);
824 if (msym)
825 {
826 eh_break_addr = SYMBOL_VALUE_ADDRESS (msym);
827 hp_cxx_exception_support = 1;
828 }
829 else
830 {
831 warning ("Unable to find exception callback routine to set breakpoint (%s).", HP_ACC_EH_break);
832 warning ("Suggest linking executable with -g (link in /opt/langtools/lib/end.o).");
833 warning ("GDB will be unable to intercept exception events.");
834 eh_break_addr = 0;
835 return 0;
836 }
837
838 /* Next look for the catch enable flag provided in end.o */
839 sym = lookup_symbol (HP_ACC_EH_catch_catch, (struct block *) NULL,
840 VAR_DOMAIN, 0, (struct symtab **) NULL);
841 if (sym) /* sometimes present in debug info */
842 {
843 eh_catch_catch_addr = SYMBOL_VALUE_ADDRESS (sym);
844 hp_cxx_exception_support = 1;
845 }
846 else
847 /* otherwise look in SOM symbol dict. */
848 {
849 msym = lookup_minimal_symbol (HP_ACC_EH_catch_catch, NULL, NULL);
850 if (msym)
851 {
852 eh_catch_catch_addr = SYMBOL_VALUE_ADDRESS (msym);
853 hp_cxx_exception_support = 1;
854 }
855 else
856 {
857 warning ("Unable to enable interception of exception catches.");
858 warning ("Executable may not have been compiled debuggable with HP aCC.");
859 warning ("Suggest linking executable with -g (link in /opt/langtools/lib/end.o).");
860 return 0;
861 }
862 }
863
864 /* Next look for the catch enable flag provided end.o */
865 sym = lookup_symbol (HP_ACC_EH_catch_catch, (struct block *) NULL,
866 VAR_DOMAIN, 0, (struct symtab **) NULL);
867 if (sym) /* sometimes present in debug info */
868 {
869 eh_catch_throw_addr = SYMBOL_VALUE_ADDRESS (sym);
870 hp_cxx_exception_support = 1;
871 }
872 else
873 /* otherwise look in SOM symbol dict. */
874 {
875 msym = lookup_minimal_symbol (HP_ACC_EH_catch_throw, NULL, NULL);
876 if (msym)
877 {
878 eh_catch_throw_addr = SYMBOL_VALUE_ADDRESS (msym);
879 hp_cxx_exception_support = 1;
880 }
881 else
882 {
883 warning ("Unable to enable interception of exception throws.");
884 warning ("Executable may not have been compiled debuggable with HP aCC.");
885 warning ("Suggest linking executable with -g (link in /opt/langtools/lib/end.o).");
886 return 0;
887 }
888 }
889
890 /* Set the flags */
891 hp_cxx_exception_support = 2; /* everything worked so far */
892 hp_cxx_exception_support_initialized = 1;
893 deprecated_exception_support_initialized = 1;
894
895 return 1;
896 }
897
898 /* Target operation for enabling or disabling interception of
899 exception events.
900 KIND is either EX_EVENT_THROW or EX_EVENT_CATCH
901 ENABLE is either 0 (disable) or 1 (enable).
902 Return value is NULL if no support found;
903 -1 if something went wrong,
904 or a pointer to a symtab/line struct if the breakpointable
905 address was found. */
906
907 struct symtab_and_line *
908 child_enable_exception_callback (enum exception_event_kind kind, int enable)
909 {
910 char buf[4];
911
912 if (!deprecated_exception_support_initialized
913 || !hp_cxx_exception_support_initialized)
914 if (!initialize_hp_cxx_exception_support ())
915 return NULL;
916
917 switch (hp_cxx_exception_support)
918 {
919 case 0:
920 /* Assuming no HP support at all */
921 return NULL;
922 case 1:
923 /* HP support should be present, but something went wrong */
924 return (struct symtab_and_line *) -1; /* yuck! */
925 /* there may be other cases in the future */
926 }
927
928 /* Set the EH hook to point to the callback routine */
929 store_unsigned_integer (buf, 4, enable ? eh_notify_callback_addr : 0); /* FIXME 32x64 problem */
930 /* pai: (temp) FIXME should there be a pack operation first? */
931 if (target_write_memory (eh_notify_hook_addr, buf, 4)) /* FIXME 32x64 problem */
932 {
933 warning ("Could not write to target memory for exception event callback.");
934 warning ("Interception of exception events may not work.");
935 return (struct symtab_and_line *) -1;
936 }
937 if (enable)
938 {
939 /* Ensure that __d_pid is set up correctly -- end.c code checks this. :-( */
940 if (PIDGET (inferior_ptid) > 0)
941 {
942 if (setup_d_pid_in_inferior ())
943 return (struct symtab_and_line *) -1;
944 }
945 else
946 {
947 warning ("Internal error: Invalid inferior pid? Cannot intercept exception events.");
948 return (struct symtab_and_line *) -1;
949 }
950 }
951
952 switch (kind)
953 {
954 case EX_EVENT_THROW:
955 store_unsigned_integer (buf, 4, enable ? 1 : 0);
956 if (target_write_memory (eh_catch_throw_addr, buf, 4)) /* FIXME 32x64? */
957 {
958 warning ("Couldn't enable exception throw interception.");
959 return (struct symtab_and_line *) -1;
960 }
961 break;
962 case EX_EVENT_CATCH:
963 store_unsigned_integer (buf, 4, enable ? 1 : 0);
964 if (target_write_memory (eh_catch_catch_addr, buf, 4)) /* FIXME 32x64? */
965 {
966 warning ("Couldn't enable exception catch interception.");
967 return (struct symtab_and_line *) -1;
968 }
969 break;
970 default:
971 error ("Request to enable unknown or unsupported exception event.");
972 }
973
974 /* Copy break address into new sal struct, malloc'ing if needed. */
975 if (!break_callback_sal)
976 {
977 break_callback_sal = (struct symtab_and_line *) xmalloc (sizeof (struct symtab_and_line));
978 }
979 init_sal (break_callback_sal);
980 break_callback_sal->symtab = NULL;
981 break_callback_sal->pc = eh_break_addr;
982 break_callback_sal->line = 0;
983 break_callback_sal->end = eh_break_addr;
984
985 return break_callback_sal;
986 }
987
988 /* Record some information about the current exception event */
989 static struct exception_event_record current_ex_event;
990 /* Convenience struct */
991 static struct symtab_and_line null_symtab_and_line =
992 {NULL, 0, 0, 0};
993
994 /* Report current exception event. Returns a pointer to a record
995 that describes the kind of the event, where it was thrown from,
996 and where it will be caught. More information may be reported
997 in the future */
998 struct exception_event_record *
999 child_get_current_exception_event (void)
1000 {
1001 CORE_ADDR event_kind;
1002 CORE_ADDR throw_addr;
1003 CORE_ADDR catch_addr;
1004 struct frame_info *fi, *curr_frame;
1005 int level = 1;
1006
1007 curr_frame = get_current_frame ();
1008 if (!curr_frame)
1009 return (struct exception_event_record *) NULL;
1010
1011 /* Go up one frame to __d_eh_notify_callback, because at the
1012 point when this code is executed, there's garbage in the
1013 arguments of __d_eh_break. */
1014 fi = find_relative_frame (curr_frame, &level);
1015 if (level != 0)
1016 return (struct exception_event_record *) NULL;
1017
1018 select_frame (fi);
1019
1020 /* Read in the arguments */
1021 /* __d_eh_notify_callback() is called with 3 arguments:
1022 1. event kind catch or throw
1023 2. the target address if known
1024 3. a flag -- not sure what this is. pai/1997-07-17 */
1025 event_kind = read_register (HPPA_ARG0_REGNUM);
1026 catch_addr = read_register (HPPA_ARG1_REGNUM);
1027
1028 /* Now go down to a user frame */
1029 /* For a throw, __d_eh_break is called by
1030 __d_eh_notify_callback which is called by
1031 __notify_throw which is called
1032 from user code.
1033 For a catch, __d_eh_break is called by
1034 __d_eh_notify_callback which is called by
1035 <stackwalking stuff> which is called by
1036 __throw__<stuff> or __rethrow_<stuff> which is called
1037 from user code. */
1038 /* FIXME: Don't use such magic numbers; search for the frames */
1039 level = (event_kind == EX_EVENT_THROW) ? 3 : 4;
1040 fi = find_relative_frame (curr_frame, &level);
1041 if (level != 0)
1042 return (struct exception_event_record *) NULL;
1043
1044 select_frame (fi);
1045 throw_addr = get_frame_pc (fi);
1046
1047 /* Go back to original (top) frame */
1048 select_frame (curr_frame);
1049
1050 current_ex_event.kind = (enum exception_event_kind) event_kind;
1051 current_ex_event.throw_sal = find_pc_line (throw_addr, 1);
1052 current_ex_event.catch_sal = find_pc_line (catch_addr, 1);
1053
1054 return &current_ex_event;
1055 }
1056
1057 /* Signal frames. */
1058 struct hppa_hpux_sigtramp_unwind_cache
1059 {
1060 CORE_ADDR base;
1061 struct trad_frame_saved_reg *saved_regs;
1062 };
1063
1064 static int hppa_hpux_tramp_reg[] = {
1065 HPPA_SAR_REGNUM,
1066 HPPA_PCOQ_HEAD_REGNUM,
1067 HPPA_PCSQ_HEAD_REGNUM,
1068 HPPA_PCOQ_TAIL_REGNUM,
1069 HPPA_PCSQ_TAIL_REGNUM,
1070 HPPA_EIEM_REGNUM,
1071 HPPA_IIR_REGNUM,
1072 HPPA_ISR_REGNUM,
1073 HPPA_IOR_REGNUM,
1074 HPPA_IPSW_REGNUM,
1075 -1,
1076 HPPA_SR4_REGNUM,
1077 HPPA_SR4_REGNUM + 1,
1078 HPPA_SR4_REGNUM + 2,
1079 HPPA_SR4_REGNUM + 3,
1080 HPPA_SR4_REGNUM + 4,
1081 HPPA_SR4_REGNUM + 5,
1082 HPPA_SR4_REGNUM + 6,
1083 HPPA_SR4_REGNUM + 7,
1084 HPPA_RCR_REGNUM,
1085 HPPA_PID0_REGNUM,
1086 HPPA_PID1_REGNUM,
1087 HPPA_CCR_REGNUM,
1088 HPPA_PID2_REGNUM,
1089 HPPA_PID3_REGNUM,
1090 HPPA_TR0_REGNUM,
1091 HPPA_TR0_REGNUM + 1,
1092 HPPA_TR0_REGNUM + 2,
1093 HPPA_CR27_REGNUM
1094 };
1095
1096 static struct hppa_hpux_sigtramp_unwind_cache *
1097 hppa_hpux_sigtramp_frame_unwind_cache (struct frame_info *next_frame,
1098 void **this_cache)
1099
1100 {
1101 struct gdbarch *gdbarch = get_frame_arch (next_frame);
1102 struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
1103 struct hppa_hpux_sigtramp_unwind_cache *info;
1104 unsigned int flag;
1105 CORE_ADDR sp, scptr;
1106 int i, incr, off, szoff;
1107
1108 if (*this_cache)
1109 return *this_cache;
1110
1111 info = FRAME_OBSTACK_ZALLOC (struct hppa_hpux_sigtramp_unwind_cache);
1112 *this_cache = info;
1113 info->saved_regs = trad_frame_alloc_saved_regs (next_frame);
1114
1115 sp = frame_unwind_register_unsigned (next_frame, HPPA_SP_REGNUM);
1116
1117 scptr = sp - 1352;
1118 off = scptr;
1119
1120 /* See /usr/include/machine/save_state.h for the structure of the save_state_t
1121 structure. */
1122
1123 flag = read_memory_unsigned_integer(scptr, 4);
1124
1125 if (!(flag & 0x40))
1126 {
1127 /* Narrow registers. */
1128 off = scptr + offsetof (save_state_t, ss_narrow);
1129 incr = 4;
1130 szoff = 0;
1131 }
1132 else
1133 {
1134 /* Wide registers. */
1135 off = scptr + offsetof (save_state_t, ss_wide) + 8;
1136 incr = 8;
1137 szoff = (tdep->bytes_per_address == 4 ? 4 : 0);
1138 }
1139
1140 for (i = 1; i < 32; i++)
1141 {
1142 info->saved_regs[HPPA_R0_REGNUM + i].addr = off + szoff;
1143 off += incr;
1144 }
1145
1146 for (i = 0;
1147 i < sizeof(hppa_hpux_tramp_reg) / sizeof(hppa_hpux_tramp_reg[0]);
1148 i++)
1149 {
1150 if (hppa_hpux_tramp_reg[i] > 0)
1151 info->saved_regs[hppa_hpux_tramp_reg[i]].addr = off + szoff;
1152 off += incr;
1153 }
1154
1155 /* TODO: fp regs */
1156
1157 info->base = frame_unwind_register_unsigned (next_frame, HPPA_SP_REGNUM);
1158
1159 return info;
1160 }
1161
1162 static void
1163 hppa_hpux_sigtramp_frame_this_id (struct frame_info *next_frame,
1164 void **this_prologue_cache,
1165 struct frame_id *this_id)
1166 {
1167 struct hppa_hpux_sigtramp_unwind_cache *info
1168 = hppa_hpux_sigtramp_frame_unwind_cache (next_frame, this_prologue_cache);
1169 *this_id = frame_id_build (info->base, frame_pc_unwind (next_frame));
1170 }
1171
1172 static void
1173 hppa_hpux_sigtramp_frame_prev_register (struct frame_info *next_frame,
1174 void **this_prologue_cache,
1175 int regnum, int *optimizedp,
1176 enum lval_type *lvalp,
1177 CORE_ADDR *addrp,
1178 int *realnump, void *valuep)
1179 {
1180 struct hppa_hpux_sigtramp_unwind_cache *info
1181 = hppa_hpux_sigtramp_frame_unwind_cache (next_frame, this_prologue_cache);
1182 hppa_frame_prev_register_helper (next_frame, info->saved_regs, regnum,
1183 optimizedp, lvalp, addrp, realnump, valuep);
1184 }
1185
1186 static const struct frame_unwind hppa_hpux_sigtramp_frame_unwind = {
1187 SIGTRAMP_FRAME,
1188 hppa_hpux_sigtramp_frame_this_id,
1189 hppa_hpux_sigtramp_frame_prev_register
1190 };
1191
1192 static const struct frame_unwind *
1193 hppa_hpux_sigtramp_unwind_sniffer (struct frame_info *next_frame)
1194 {
1195 CORE_ADDR pc = frame_pc_unwind (next_frame);
1196 char *name;
1197
1198 find_pc_partial_function (pc, &name, NULL, NULL);
1199
1200 if (name && strcmp(name, "_sigreturn") == 0)
1201 return &hppa_hpux_sigtramp_frame_unwind;
1202
1203 return NULL;
1204 }
1205
1206 static void
1207 hppa_hpux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
1208 {
1209 struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
1210
1211 if (tdep->bytes_per_address == 4)
1212 set_gdbarch_in_solib_call_trampoline (gdbarch,
1213 hppa32_hpux_in_solib_call_trampoline);
1214 else
1215 set_gdbarch_in_solib_call_trampoline (gdbarch,
1216 hppa64_hpux_in_solib_call_trampoline);
1217
1218 set_gdbarch_in_solib_return_trampoline (gdbarch,
1219 hppa_hpux_in_solib_return_trampoline);
1220 set_gdbarch_skip_trampoline_code (gdbarch, hppa_hpux_skip_trampoline_code);
1221
1222 frame_unwind_append_sniffer (gdbarch, hppa_hpux_sigtramp_unwind_sniffer);
1223 }
1224
1225 static void
1226 hppa_hpux_som_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
1227 {
1228 struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
1229
1230 tdep->is_elf = 0;
1231 hppa_hpux_init_abi (info, gdbarch);
1232 }
1233
1234 static void
1235 hppa_hpux_elf_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
1236 {
1237 struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
1238
1239 tdep->is_elf = 1;
1240 hppa_hpux_init_abi (info, gdbarch);
1241 }
1242
1243 void
1244 _initialize_hppa_hpux_tdep (void)
1245 {
1246 gdbarch_register_osabi (bfd_arch_hppa, 0, GDB_OSABI_HPUX_SOM,
1247 hppa_hpux_som_init_abi);
1248 gdbarch_register_osabi (bfd_arch_hppa, bfd_mach_hppa20w, GDB_OSABI_HPUX_ELF,
1249 hppa_hpux_elf_init_abi);
1250 }
This page took 0.057049 seconds and 5 git commands to generate.