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

Side by Side Diff: gdb/xtensa-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/xtensa-linux-nat.c ('k') | include/ChangeLog » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* Target-dependent code for the Xtensa port of GDB, the GNU debugger. 1 /* Target-dependent code for the Xtensa port of GDB, the GNU debugger.
2 2
3 Copyright (C) 2003, 2005-2012 Free Software Foundation, Inc. 3 Copyright (C) 2003, 2005-2012 Free Software Foundation, Inc.
4 4
5 This file is part of GDB. 5 This file is part of GDB.
6 6
7 This program is free software; you can redistribute it and/or modify 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 8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3 of the License, or 9 the Free Software Foundation; either version 3 of the License, or
10 (at your option) any later version. 10 (at your option) any later version.
(...skipping 647 matching lines...) Expand 10 before | Expand all | Expand 10 after
658 if (regnum == gdbarch_num_regs (gdbarch) 658 if (regnum == gdbarch_num_regs (gdbarch)
659 + gdbarch_num_pseudo_regs (gdbarch) -1) 659 + gdbarch_num_pseudo_regs (gdbarch) -1)
660 regnum = gdbarch_tdep (gdbarch)->a0_base + 1; 660 regnum = gdbarch_tdep (gdbarch)->a0_base + 1;
661 661
662 /* Renumber register, if aliase a0..a15 on Windowed ABI. */ 662 /* Renumber register, if aliase a0..a15 on Windowed ABI. */
663 if (gdbarch_tdep (gdbarch)->isa_use_windowed_registers 663 if (gdbarch_tdep (gdbarch)->isa_use_windowed_registers
664 && (regnum >= gdbarch_tdep (gdbarch)->a0_base) 664 && (regnum >= gdbarch_tdep (gdbarch)->a0_base)
665 && (regnum <= gdbarch_tdep (gdbarch)->a0_base + 15)) 665 && (regnum <= gdbarch_tdep (gdbarch)->a0_base + 15))
666 { 666 {
667 gdb_byte *buf = (gdb_byte *) alloca (MAX_REGISTER_SIZE); 667 gdb_byte *buf = (gdb_byte *) alloca (MAX_REGISTER_SIZE);
668 unsigned int wb;
669 668
670 regcache_raw_read (regcache, 669 regcache_raw_read (regcache,
671 gdbarch_tdep (gdbarch)->wb_regnum, buf); 670 gdbarch_tdep (gdbarch)->wb_regnum, buf);
672 regnum = arreg_number (gdbarch, regnum, 671 regnum = arreg_number (gdbarch, regnum,
673 extract_unsigned_integer (buf, 4, byte_order)); 672 extract_unsigned_integer (buf, 4, byte_order));
674 } 673 }
675 674
676 /* We can always write 'core' registers. 675 /* We can always write 'core' registers.
677 Note: We might have converted Ax->ARy. */ 676 Note: We might have converted Ax->ARy. */
678 if (regnum >= 0 && regnum < gdbarch_num_regs (gdbarch)) 677 if (regnum >= 0 && regnum < gdbarch_num_regs (gdbarch))
(...skipping 996 matching lines...) Expand 10 before | Expand all | Expand 10 after
1675 if (len < 4) 1674 if (len < 4)
1676 regcache_raw_write_part (regcache, areg, offset, len, valbuf); 1675 regcache_raw_write_part (regcache, areg, offset, len, valbuf);
1677 else 1676 else
1678 regcache_raw_write (regcache, areg, valbuf); 1677 regcache_raw_write (regcache, areg, valbuf);
1679 } 1678 }
1680 } 1679 }
1681 1680
1682 1681
1683 static enum return_value_convention 1682 static enum return_value_convention
1684 xtensa_return_value (struct gdbarch *gdbarch, 1683 xtensa_return_value (struct gdbarch *gdbarch,
1685 » » struct type *func_type, 1684 » » struct value *function,
1686 struct type *valtype, 1685 struct type *valtype,
1687 struct regcache *regcache, 1686 struct regcache *regcache,
1688 gdb_byte *readbuf, 1687 gdb_byte *readbuf,
1689 const gdb_byte *writebuf) 1688 const gdb_byte *writebuf)
1690 { 1689 {
1691 /* Structures up to 16 bytes are returned in registers. */ 1690 /* Structures up to 16 bytes are returned in registers. */
1692 1691
1693 int struct_return = ((TYPE_CODE (valtype) == TYPE_CODE_STRUCT 1692 int struct_return = ((TYPE_CODE (valtype) == TYPE_CODE_STRUCT
1694 || TYPE_CODE (valtype) == TYPE_CODE_UNION 1693 || TYPE_CODE (valtype) == TYPE_CODE_UNION
1695 || TYPE_CODE (valtype) == TYPE_CODE_ARRAY) 1694 || TYPE_CODE (valtype) == TYPE_CODE_ARRAY)
(...skipping 1113 matching lines...) Expand 10 before | Expand all | Expand 10 after
2809 char ibuf[XTENSA_ISA_BSZ]; 2808 char ibuf[XTENSA_ISA_BSZ];
2810 CORE_ADDR ia, bt, ba; 2809 CORE_ADDR ia, bt, ba;
2811 xtensa_format ifmt; 2810 xtensa_format ifmt;
2812 int ilen, islots, is; 2811 int ilen, islots, is;
2813 xtensa_opcode opc; 2812 xtensa_opcode opc;
2814 int insn_num = 0; 2813 int insn_num = 0;
2815 int fail = 0; 2814 int fail = 0;
2816 void (*func) (struct gdbarch *, int, int, int, CORE_ADDR); 2815 void (*func) (struct gdbarch *, int, int, int, CORE_ADDR);
2817 2816
2818 int at, as, offset; 2817 int at, as, offset;
2819 int num_operands;
2820 2818
2821 /* WindowUnderflow12 = true, when inside _WindowUnderflow12. */ 2819 /* WindowUnderflow12 = true, when inside _WindowUnderflow12. */
2822 int WindowUnderflow12 = (current_pc & 0x1ff) >= 0x140; 2820 int WindowUnderflow12 = (current_pc & 0x1ff) >= 0x140;
2823 2821
2824 isa = xtensa_default_isa; 2822 isa = xtensa_default_isa;
2825 gdb_assert (XTENSA_ISA_BSZ >= xtensa_isa_maxlength (isa)); 2823 gdb_assert (XTENSA_ISA_BSZ >= xtensa_isa_maxlength (isa));
2826 ins = xtensa_insnbuf_alloc (isa); 2824 ins = xtensa_insnbuf_alloc (isa);
2827 slot = xtensa_insnbuf_alloc (isa); 2825 slot = xtensa_insnbuf_alloc (isa);
2828 ba = 0; 2826 ba = 0;
2829 ia = current_pc; 2827 ia = current_pc;
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after
3314 class_maintenance, 3312 class_maintenance,
3315 &xtensa_debug_level, 3313 &xtensa_debug_level,
3316 _("Set Xtensa debugging."), 3314 _("Set Xtensa debugging."),
3317 _("Show Xtensa debugging."), _("\ 3315 _("Show Xtensa debugging."), _("\
3318 When non-zero, Xtensa-specific debugging is enabled. \ 3316 When non-zero, Xtensa-specific debugging is enabled. \
3319 Can be 1, 2, 3, or 4 indicating the level of debugging."), 3317 Can be 1, 2, 3, or 4 indicating the level of debugging."),
3320 NULL, 3318 NULL,
3321 NULL, 3319 NULL,
3322 &setdebuglist, &showdebuglist); 3320 &setdebuglist, &showdebuglist);
3323 } 3321 }
OLDNEW
« no previous file with comments | « gdb/xtensa-linux-nat.c ('k') | include/ChangeLog » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698