Deleted Added
sdiff udiff text old ( 2684:71f3cabf891f ) new ( 3082:2b5c51982f78 )
full compact
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;

--- 782 unchanged lines hidden (view full) ---

791// gdb/remote.c functions want to return.
792bool
793RemoteGDB::trap(int type)
794{
795 uint64_t val;
796 size_t datalen, len;
797 char data[KGDB_BUFLEN + 1];
798 char buffer[sizeof(gdbregs) * 2 + 256];
799 const char *p;
800 char command, subcmd;
801 string var;
802 bool ret;
803
804 if (!attached)
805 return false;
806

--- 91 unchanged lines hidden (view full) ---

898 continue;
899 }
900 if (!acc(val, len)) {
901 send("E05");
902 continue;
903 }
904
905 if (read(val, (size_t)len, (char *)buffer)) {
906 // variable length array would be nice, but C++ doesn't
907 // officially support those...
908 char *temp = new char[2*len+1];
909 mem2hex(temp, buffer, len);
910 send(temp);
911 delete [] temp;
912 } else {
913 send("E05");
914 }
915 continue;
916
917 case KGDB_MEM_W:
918 val = hex2i(&p);
919 if (*p++ != ',') {
920 send("E06");
921 continue;

--- 262 unchanged lines hidden ---