Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(407)

Side by Side Diff: gdb/rs6000-aix-tdep.c

Issue 11969036: Merge GDB 7.5.1 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@master
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « gdb/rl78-tdep.c ('k') | gdb/rs6000-nat.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* Native support code for PPC AIX, for GDB the GNU debugger. 1 /* Native support code for PPC AIX, for GDB the GNU debugger.
2 2
3 Copyright (C) 2006-2012 Free Software Foundation, Inc. 3 Copyright (C) 2006-2012 Free Software Foundation, Inc.
4 4
5 Free Software Foundation, Inc. 5 Free Software Foundation, Inc.
6 6
7 This file is part of GDB. 7 This file is part of GDB.
8 8
9 This program is free software; you can redistribute it and/or modify 9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by 10 it under the terms of the GNU General Public License as published by
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 { 417 {
418 CORE_ADDR tocvalue = (*rs6000_find_toc_address_hook) (func_addr); 418 CORE_ADDR tocvalue = (*rs6000_find_toc_address_hook) (func_addr);
419 regcache_raw_write_signed (regcache, tdep->ppc_toc_regnum, tocvalue); 419 regcache_raw_write_signed (regcache, tdep->ppc_toc_regnum, tocvalue);
420 } 420 }
421 421
422 target_store_registers (regcache, -1); 422 target_store_registers (regcache, -1);
423 return sp; 423 return sp;
424 } 424 }
425 425
426 static enum return_value_convention 426 static enum return_value_convention
427 rs6000_return_value (struct gdbarch *gdbarch, struct type *func_type, 427 rs6000_return_value (struct gdbarch *gdbarch, struct value *function,
428 struct type *valtype, struct regcache *regcache, 428 struct type *valtype, struct regcache *regcache,
429 gdb_byte *readbuf, const gdb_byte *writebuf) 429 gdb_byte *readbuf, const gdb_byte *writebuf)
430 { 430 {
431 struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); 431 struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
432 enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); 432 enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
433 gdb_byte buf[8];
434 433
435 /* The calling convention this function implements assumes the 434 /* The calling convention this function implements assumes the
436 processor has floating-point registers. We shouldn't be using it 435 processor has floating-point registers. We shouldn't be using it
437 on PowerPC variants that lack them. */ 436 on PowerPC variants that lack them. */
438 gdb_assert (ppc_floating_point_unit_p (gdbarch)); 437 gdb_assert (ppc_floating_point_unit_p (gdbarch));
439 438
440 /* AltiVec extension: Functions that declare a vector data type as a 439 /* AltiVec extension: Functions that declare a vector data type as a
441 return value place that return value in VR2. */ 440 return value place that return value in VR2. */
442 if (TYPE_CODE (valtype) == TYPE_CODE_ARRAY && TYPE_VECTOR (valtype) 441 if (TYPE_CODE (valtype) == TYPE_CODE_ARRAY && TYPE_VECTOR (valtype)
443 && TYPE_LENGTH (valtype) == 16) 442 && TYPE_LENGTH (valtype) == 16)
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
576 s = find_pc_section (addr); 575 s = find_pc_section (addr);
577 576
578 /* Normally, functions live inside a section that is executable. 577 /* Normally, functions live inside a section that is executable.
579 So, if ADDR points to a non-executable section, then treat it 578 So, if ADDR points to a non-executable section, then treat it
580 as a function descriptor and return the target address iff 579 as a function descriptor and return the target address iff
581 the target address itself points to a section that is executable. */ 580 the target address itself points to a section that is executable. */
582 if (s && (s->the_bfd_section->flags & SEC_CODE) == 0) 581 if (s && (s->the_bfd_section->flags & SEC_CODE) == 0)
583 { 582 {
584 CORE_ADDR pc = 0; 583 CORE_ADDR pc = 0;
585 struct obj_section *pc_section; 584 struct obj_section *pc_section;
586 struct gdb_exception e; 585 volatile struct gdb_exception e;
587 586
588 TRY_CATCH (e, RETURN_MASK_ERROR) 587 TRY_CATCH (e, RETURN_MASK_ERROR)
589 { 588 {
590 pc = read_memory_unsigned_integer (addr, tdep->wordsize, byte_order); 589 pc = read_memory_unsigned_integer (addr, tdep->wordsize, byte_order);
591 } 590 }
592 if (e.reason < 0) 591 if (e.reason < 0)
593 { 592 {
594 /* An error occured during reading. Probably a memory error 593 /* An error occured during reading. Probably a memory error
595 due to the section not being loaded yet. This address 594 due to the section not being loaded yet. This address
596 cannot be a function descriptor. */ 595 cannot be a function descriptor. */
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
785 gdbarch_register_osabi_sniffer (bfd_arch_powerpc, 784 gdbarch_register_osabi_sniffer (bfd_arch_powerpc,
786 bfd_target_xcoff_flavour, 785 bfd_target_xcoff_flavour,
787 rs6000_aix_osabi_sniffer); 786 rs6000_aix_osabi_sniffer);
788 787
789 gdbarch_register_osabi (bfd_arch_rs6000, 0, GDB_OSABI_AIX, 788 gdbarch_register_osabi (bfd_arch_rs6000, 0, GDB_OSABI_AIX,
790 rs6000_aix_init_osabi); 789 rs6000_aix_init_osabi);
791 gdbarch_register_osabi (bfd_arch_powerpc, 0, GDB_OSABI_AIX, 790 gdbarch_register_osabi (bfd_arch_powerpc, 0, GDB_OSABI_AIX,
792 rs6000_aix_init_osabi); 791 rs6000_aix_init_osabi);
793 } 792 }
794 793
OLDNEW
« no previous file with comments | « gdb/rl78-tdep.c ('k') | gdb/rs6000-nat.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698