remote_gdb.cc (6712:b95abe00dd9d) | remote_gdb.cc (7720:65d338a8dba4) |
---|---|
1/* 2 * Copyright (c) 2002-2005 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 631 unchanged lines hidden (view full) --- 640 bool ret; 641 642 if (!attached) 643 return false; 644 645 bufferSize = gdbregs.bytes() * 2 + 256; 646 buffer = (char*)malloc(bufferSize); 647 | 1/* 2 * Copyright (c) 2002-2005 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 631 unchanged lines hidden (view full) --- 640 bool ret; 641 642 if (!attached) 643 return false; 644 645 bufferSize = gdbregs.bytes() * 2 + 256; 646 buffer = (char*)malloc(bufferSize); 647 |
648 DPRINTF(GDBMisc, "trap: PC=%#x NPC=%#x\n", 649 context->readPC(), context->readNextPC()); | 648 TheISA::PCState pc = context->pcState(); 649 DPRINTF(GDBMisc, "trap: PC=%s\n", pc); |
650 651 clearSingleStep(); 652 653 /* 654 * The first entry to this function is normally through 655 * a breakpoint trap in kgdb_connect(), in which case we 656 * must advance past the breakpoint because gdb will not. 657 * --- 143 unchanged lines hidden (view full) --- 801 clearSingleStep(); 802 detach(); 803 goto out; 804 805 case GDBAsyncCont: 806 subcmd = hex2i(&p); 807 if (*p++ == ';') { 808 val = hex2i(&p); | 650 651 clearSingleStep(); 652 653 /* 654 * The first entry to this function is normally through 655 * a breakpoint trap in kgdb_connect(), in which case we 656 * must advance past the breakpoint because gdb will not. 657 * --- 143 unchanged lines hidden (view full) --- 801 clearSingleStep(); 802 detach(); 803 goto out; 804 805 case GDBAsyncCont: 806 subcmd = hex2i(&p); 807 if (*p++ == ';') { 808 val = hex2i(&p); |
809 context->setPC(val); 810 context->setNextPC(val + sizeof(MachInst)); | 809 context->pcState(val); |
811 } 812 clearSingleStep(); 813 goto out; 814 815 case GDBCont: 816 if (p - data < (ptrdiff_t)datalen) { 817 val = hex2i(&p); | 810 } 811 clearSingleStep(); 812 goto out; 813 814 case GDBCont: 815 if (p - data < (ptrdiff_t)datalen) { 816 val = hex2i(&p); |
818 context->setPC(val); 819 context->setNextPC(val + sizeof(MachInst)); | 817 context->pcState(val); |
820 } 821 clearSingleStep(); 822 goto out; 823 824 case GDBAsyncStep: 825 subcmd = hex2i(&p); 826 if (*p++ == ';') { 827 val = hex2i(&p); | 818 } 819 clearSingleStep(); 820 goto out; 821 822 case GDBAsyncStep: 823 subcmd = hex2i(&p); 824 if (*p++ == ';') { 825 val = hex2i(&p); |
828 context->setPC(val); 829 context->setNextPC(val + sizeof(MachInst)); | 826 context->pcState(val); |
830 } 831 setSingleStep(); 832 goto out; 833 834 case GDBStep: 835 if (p - data < (ptrdiff_t)datalen) { 836 val = hex2i(&p); | 827 } 828 setSingleStep(); 829 goto out; 830 831 case GDBStep: 832 if (p - data < (ptrdiff_t)datalen) { 833 val = hex2i(&p); |
837 context->setPC(val); 838 context->setNextPC(val + sizeof(MachInst)); | 834 context->pcState(val); |
839 } 840 setSingleStep(); 841 goto out; 842 843 case GDBClrHwBkpt: 844 subcmd = *p++; 845 if (*p++ != ',') send("E0D"); 846 val = hex2i(&p); --- 180 unchanged lines hidden --- | 835 } 836 setSingleStep(); 837 goto out; 838 839 case GDBClrHwBkpt: 840 subcmd = *p++; 841 if (*p++ != ',') send("E0D"); 842 val = hex2i(&p); --- 180 unchanged lines hidden --- |