remote_gdb.cc (3960:1dca397b2bab) | remote_gdb.cc (3980:9bcb2a2e9bb8) |
---|---|
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; --- 617 unchanged lines hidden (view full) --- 626// makes sense to use POSIX errno values, because that is what the 627// gdb/remote.c functions want to return. 628bool 629BaseRemoteGDB::trap(int type) 630{ 631 uint64_t val; 632 size_t datalen, len; 633 char data[GDBPacketBufLen + 1]; | 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; --- 617 unchanged lines hidden (view full) --- 626// makes sense to use POSIX errno values, because that is what the 627// gdb/remote.c functions want to return. 628bool 629BaseRemoteGDB::trap(int type) 630{ 631 uint64_t val; 632 size_t datalen, len; 633 char data[GDBPacketBufLen + 1]; |
634 char buffer[gdbregs.bytes() * 2 + 256]; | 634 char *buffer; |
635 const char *p; 636 char command, subcmd; 637 string var; 638 bool ret; 639 640 if (!attached) 641 return false; 642 | 635 const char *p; 636 char command, subcmd; 637 string var; 638 bool ret; 639 640 if (!attached) 641 return false; 642 |
643 buffer = (char*)malloc(gdbregs.bytes() * 2 + 256); 644 |
|
643 DPRINTF(GDBMisc, "trap: PC=%#x NPC=%#x\n", 644 context->readPC(), context->readNextPC()); 645 646 clearSingleStep(); 647 648 /* 649 * The first entry to this function is normally through 650 * a breakpoint trap in kgdb_connect(), in which case we --- 281 unchanged lines hidden (view full) --- 932 send(""); 933 continue; 934 935 936 } 937 } 938 939 out: | 645 DPRINTF(GDBMisc, "trap: PC=%#x NPC=%#x\n", 646 context->readPC(), context->readNextPC()); 647 648 clearSingleStep(); 649 650 /* 651 * The first entry to this function is normally through 652 * a breakpoint trap in kgdb_connect(), in which case we --- 281 unchanged lines hidden (view full) --- 934 send(""); 935 continue; 936 937 938 } 939 } 940 941 out: |
942 free(buffer); |
|
940 return true; 941} 942 943// Convert a hex digit into an integer. 944// This returns -1 if the argument passed is no valid hex digit. 945int 946BaseRemoteGDB::digit2i(char c) 947{ --- 73 unchanged lines hidden --- | 943 return true; 944} 945 946// Convert a hex digit into an integer. 947// This returns -1 if the argument passed is no valid hex digit. 948int 949BaseRemoteGDB::digit2i(char c) 950{ --- 73 unchanged lines hidden --- |