| OLD | NEW | 
|     1 /* Target-dependent code for Atmel AVR, for GDB. |     1 /* Target-dependent code for Atmel AVR, for GDB. | 
|     2  |     2  | 
|     3    Copyright (C) 1996-2012 Free Software Foundation, Inc. |     3    Copyright (C) 1996-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 724 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   735      Scan: |   735      Scan: | 
|   736      in r28,__SP_L__ |   736      in r28,__SP_L__ | 
|   737      in r29,__SP_H__ */ |   737      in r29,__SP_H__ */ | 
|   738  |   738  | 
|   739   if (scan_stage == 1 && vpc < len) |   739   if (scan_stage == 1 && vpc < len) | 
|   740     { |   740     { | 
|   741       static const unsigned char img[] = { |   741       static const unsigned char img[] = { | 
|   742         0xcd, 0xb7,             /* in r28,__SP_L__ */ |   742         0xcd, 0xb7,             /* in r28,__SP_L__ */ | 
|   743         0xde, 0xb7              /* in r29,__SP_H__ */ |   743         0xde, 0xb7              /* in r29,__SP_H__ */ | 
|   744       }; |   744       }; | 
|   745       unsigned short insn1; |  | 
|   746  |   745  | 
|   747       if (vpc + sizeof (img) < len |   746       if (vpc + sizeof (img) < len | 
|   748           && memcmp (prologue + vpc, img, sizeof (img)) == 0) |   747           && memcmp (prologue + vpc, img, sizeof (img)) == 0) | 
|   749         { |   748         { | 
|   750           vpc += 4; |   749           vpc += 4; | 
|   751           scan_stage = 2; |   750           scan_stage = 2; | 
|   752         } |   751         } | 
|   753     } |   752     } | 
|   754  |   753  | 
|   755   /* Third stage of the prologue scanning.  (Really two stages). |   754   /* Third stage of the prologue scanning.  (Really two stages). | 
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   895     return avr_break_insn; |   894     return avr_break_insn; | 
|   896 } |   895 } | 
|   897  |   896  | 
|   898 /* Determine, for architecture GDBARCH, how a return value of TYPE |   897 /* Determine, for architecture GDBARCH, how a return value of TYPE | 
|   899    should be returned.  If it is supposed to be returned in registers, |   898    should be returned.  If it is supposed to be returned in registers, | 
|   900    and READBUF is non-zero, read the appropriate value from REGCACHE, |   899    and READBUF is non-zero, read the appropriate value from REGCACHE, | 
|   901    and copy it into READBUF.  If WRITEBUF is non-zero, write the value |   900    and copy it into READBUF.  If WRITEBUF is non-zero, write the value | 
|   902    from WRITEBUF into REGCACHE.  */ |   901    from WRITEBUF into REGCACHE.  */ | 
|   903  |   902  | 
|   904 static enum return_value_convention |   903 static enum return_value_convention | 
|   905 avr_return_value (struct gdbarch *gdbarch, struct type *func_type, |   904 avr_return_value (struct gdbarch *gdbarch, struct value *function, | 
|   906                   struct type *valtype, struct regcache *regcache, |   905                   struct type *valtype, struct regcache *regcache, | 
|   907                   gdb_byte *readbuf, const gdb_byte *writebuf) |   906                   gdb_byte *readbuf, const gdb_byte *writebuf) | 
|   908 { |   907 { | 
|   909   int i; |   908   int i; | 
|   910   /* Single byte are returned in r24. |   909   /* Single byte are returned in r24. | 
|   911      Otherwise, the MSB of the return value is always in r25, calculate which |   910      Otherwise, the MSB of the return value is always in r25, calculate which | 
|   912      register holds the LSB.  */ |   911      register holds the LSB.  */ | 
|   913   int lsb_reg; |   912   int lsb_reg; | 
|   914  |   913  | 
|   915   if ((TYPE_CODE (valtype) == TYPE_CODE_STRUCT |   914   if ((TYPE_CODE (valtype) == TYPE_CODE_STRUCT | 
| (...skipping 628 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  1544      the values of the io space registers in a saner way than just using |  1543      the values of the io space registers in a saner way than just using | 
|  1545      `x/NNNb ADDR`.  */ |  1544      `x/NNNb ADDR`.  */ | 
|  1546  |  1545  | 
|  1547   /* FIXME: TRoth/2002-02-18: This should probably be changed to 'info avr |  1546   /* FIXME: TRoth/2002-02-18: This should probably be changed to 'info avr | 
|  1548      io_registers' to signify it is not available on other platforms.  */ |  1547      io_registers' to signify it is not available on other platforms.  */ | 
|  1549  |  1548  | 
|  1550   add_cmd ("io_registers", class_info, avr_io_reg_read_command, |  1549   add_cmd ("io_registers", class_info, avr_io_reg_read_command, | 
|  1551            _("query remote avr target for io space register values"), |  1550            _("query remote avr target for io space register values"), | 
|  1552            &infolist); |  1551            &infolist); | 
|  1553 } |  1552 } | 
| OLD | NEW |