@@ -147,7 +147,7 @@ static bool poll_socket(const ScopedFd& sock_fd, short events, int timeoutMs) {
147
147
148
148
int ret = poll (&pfd, 1 , timeoutMs);
149
149
if (ret < 0 && errno != EINTR) {
150
- LOG (info) << " gdb socket has been closed" ;
150
+ LOG (info) << " debugger socket has been closed" ;
151
151
}
152
152
return ret > 0 ;
153
153
}
@@ -171,7 +171,7 @@ void GdbServerConnection::read_data_once() {
171
171
uint8_t buf[4096 ];
172
172
nread = read (sock_fd, buf, sizeof (buf));
173
173
if (nread <= 0 ) {
174
- LOG (info) << " Could not read data from gdb socket, "
174
+ LOG (info) << " Could not read data from debugger socket, "
175
175
" marking connection as closed" ;
176
176
connection_alive_ = false ;
177
177
} else {
@@ -193,7 +193,7 @@ void GdbServerConnection::write_flush() {
193
193
nwritten = write (sock_fd, outbuf.data () + write_index,
194
194
outbuf.size () - write_index);
195
195
if (nwritten < 0 ) {
196
- LOG (info) << " Could not write data to gdb socket, "
196
+ LOG (info) << " Could not write data to debugger socket, "
197
197
" marking connection as closed" ;
198
198
connection_alive_ = false ;
199
199
outbuf.clear ();
@@ -294,7 +294,7 @@ void GdbServerConnection::write_hex_bytes_packet(const uint8_t* bytes, size_t le
294
294
295
295
static void parser_assert (bool cond) {
296
296
if (!cond) {
297
- fputs (" Failed to parse gdb request\n " , stderr);
297
+ fputs (" Failed to parse debugger request\n " , stderr);
298
298
DEBUG_ASSERT (false );
299
299
exit (2 );
300
300
}
@@ -543,7 +543,7 @@ bool GdbServerConnection::xfer(const char* name, char* args) {
543
543
++args;
544
544
}
545
545
546
- LOG (debug) << " gdb asks us to transfer " << name << " mode=" << mode
546
+ LOG (debug) << " debugger asks us to transfer " << name << " mode=" << mode
547
547
<< " , annex=" << annex << " , offset=" << offset << " len=" << len;
548
548
549
549
if (!strcmp (name, " auxv" )) {
@@ -672,7 +672,7 @@ bool GdbServerConnection::query(char* payload) {
672
672
name = payload;
673
673
674
674
if (strstr (name, " RRCmd" ) == name) {
675
- LOG (debug) << " gdb requests rr cmd: " << name;
675
+ LOG (debug) << " debugger requests rr cmd: " << name;
676
676
req = GdbRequest (DREQ_RR_CMD);
677
677
parser_assert (args && *args);
678
678
char * endp = strchr (args, ' :' );
@@ -696,19 +696,19 @@ bool GdbServerConnection::query(char* payload) {
696
696
return true ;
697
697
}
698
698
if (!strcmp (name, " C" )) {
699
- LOG (debug) << " gdb requests current thread ID" ;
699
+ LOG (debug) << " debugger requests current thread ID" ;
700
700
req = GdbRequest (DREQ_GET_CURRENT_THREAD);
701
701
return true ;
702
702
}
703
703
if (!strcmp (name, " Attached" )) {
704
- LOG (debug) << " gdb asks if this is a new or existing process" ;
704
+ LOG (debug) << " debugger asks if this is a new or existing process" ;
705
705
/* Tell gdb this is an existing process; it might be
706
706
* (see emergency_debug()). */
707
707
write_packet (" 1" );
708
708
return false ;
709
709
}
710
710
if (!strcmp (name, " fThreadInfo" )) {
711
- LOG (debug) << " gdb asks for thread list" ;
711
+ LOG (debug) << " debugger asks for thread list" ;
712
712
req = GdbRequest (DREQ_GET_THREAD_LIST);
713
713
return true ;
714
714
}
@@ -717,7 +717,7 @@ bool GdbServerConnection::query(char* payload) {
717
717
return false ;
718
718
}
719
719
if (!strcmp (name, " GetTLSAddr" )) {
720
- LOG (debug) << " gdb asks for TLS addr" ;
720
+ LOG (debug) << " debugger asks for TLS addr" ;
721
721
req = GdbRequest (DREQ_TLS);
722
722
req.target = parse_threadid (args, &args);
723
723
parser_assert (*args == ' ,' );
@@ -732,7 +732,7 @@ bool GdbServerConnection::query(char* payload) {
732
732
return true ;
733
733
}
734
734
if (!strcmp (name, " Offsets" )) {
735
- LOG (debug) << " gdb asks for section offsets" ;
735
+ LOG (debug) << " debugger asks for section offsets" ;
736
736
req = GdbRequest (DREQ_GET_OFFSETS);
737
737
req.target = query_thread;
738
738
return true ;
@@ -744,7 +744,7 @@ bool GdbServerConnection::query(char* payload) {
744
744
}
745
745
if (!strcmp (name, " Supported" )) {
746
746
/* TODO process these */
747
- LOG (debug) << " gdb supports " << args;
747
+ LOG (debug) << " debugger supports " << args;
748
748
749
749
multiprocess_supported_ = strstr (args, " multiprocess+" ) != nullptr ;
750
750
hwbreak_supported_ = strstr (args, " hwbreak+" ) != nullptr ;
@@ -774,7 +774,7 @@ bool GdbServerConnection::query(char* payload) {
774
774
}
775
775
if (!strcmp (name, " Symbol" )) {
776
776
#ifdef PROC_SERVICE_H
777
- LOG (debug) << " gdb is ready for symbol lookups" ;
777
+ LOG (debug) << " debugger is ready for symbol lookups" ;
778
778
const char * colon = strchr (args, ' :' );
779
779
parser_assert (colon != nullptr );
780
780
req = GdbRequest (DREQ_QSYMBOL);
@@ -789,7 +789,7 @@ bool GdbServerConnection::query(char* payload) {
789
789
req.sym ().name = decode_ascii_encoded_hex_str (args);
790
790
return true ;
791
791
#else
792
- LOG (debug) << " gdb is ready for symbol lookups, but we don't support them" ;
792
+ LOG (debug) << " debugger is ready for symbol lookups, but we don't support them" ;
793
793
write_packet (" " );
794
794
return false ;
795
795
#endif
@@ -807,7 +807,7 @@ bool GdbServerConnection::query(char* payload) {
807
807
return true ;
808
808
}
809
809
if (!strcmp (name, " TStatus" )) {
810
- LOG (debug) << " gdb asks for trace status" ;
810
+ LOG (debug) << " debugger asks for trace status" ;
811
811
/* XXX from the docs, it appears that we should reply
812
812
* with "T0" here. But if we do, gdb keeps bothering
813
813
* us with trace queries. So pretend we don't know
@@ -839,15 +839,15 @@ bool GdbServerConnection::query(char* payload) {
839
839
read_binary_data ((const uint8_t *)args, inbuf.data () + packetend,
840
840
req.mem ().data );
841
841
842
- LOG (debug) << " gdb searching memory (addr=" << HEX (req.mem ().addr )
842
+ LOG (debug) << " debugger searching memory (addr=" << HEX (req.mem ().addr )
843
843
<< " , len=" << req.mem ().len << " )" ;
844
844
return true ;
845
845
}
846
846
write_packet (" " );
847
847
return false ;
848
848
}
849
849
850
- UNHANDLED_REQ () << " Unhandled gdb query: q" << name;
850
+ UNHANDLED_REQ () << " Unhandled debugger query: q" << name;
851
851
return false ;
852
852
}
853
853
@@ -890,7 +890,7 @@ bool GdbServerConnection::set_var(char* payload) {
890
890
return false ;
891
891
}
892
892
893
- UNHANDLED_REQ () << " Unhandled gdb set: Q" << name;
893
+ UNHANDLED_REQ () << " Unhandled debugger set: Q" << name;
894
894
return false ;
895
895
}
896
896
@@ -911,7 +911,7 @@ bool GdbServerConnection::process_bpacket(char* payload) {
911
911
req.cont ().actions .push_back (GdbContAction (ACTION_STEP, resume_thread));
912
912
return true ;
913
913
} else {
914
- UNHANDLED_REQ () << " Unhandled gdb bpacket: b" << payload;
914
+ UNHANDLED_REQ () << " Unhandled debugger bpacket: b" << payload;
915
915
return false ;
916
916
}
917
917
}
@@ -1038,7 +1038,7 @@ bool GdbServerConnection::process_vpacket(char* payload) {
1038
1038
}
1039
1039
1040
1040
if (!strcmp (" Cont?" , name)) {
1041
- LOG (debug) << " gdb queries which continue commands we support" ;
1041
+ LOG (debug) << " debugger queries which continue commands we support" ;
1042
1042
write_packet (" vCont;c;C;s;S;" );
1043
1043
return false ;
1044
1044
}
@@ -1048,7 +1048,7 @@ bool GdbServerConnection::process_vpacket(char* payload) {
1048
1048
// assume that this kill request is being made because
1049
1049
// a "vRun" restart is coming right up. We know how
1050
1050
// to implement vRun, so we'll ignore this one.
1051
- LOG (debug) << " gdb asks us to kill tracee(s); ignoring" ;
1051
+ LOG (debug) << " debugger asks us to kill tracee(s); ignoring" ;
1052
1052
write_packet (" OK" );
1053
1053
return false ;
1054
1054
}
@@ -1062,7 +1062,7 @@ bool GdbServerConnection::process_vpacket(char* payload) {
1062
1062
*args++ = ' \0 ' ;
1063
1063
}
1064
1064
if (strlen (filename)) {
1065
- FATAL () << " gdb wants us to run the exe image `" << filename
1065
+ FATAL () << " debugger wants us to run the exe image `" << filename
1066
1066
<< " ', but we don't support that." ;
1067
1067
}
1068
1068
if (!args) {
@@ -1163,7 +1163,7 @@ bool GdbServerConnection::process_vpacket(char* payload) {
1163
1163
}
1164
1164
}
1165
1165
1166
- UNHANDLED_REQ () << " Unhandled gdb vpacket: v" << name;
1166
+ UNHANDLED_REQ () << " Unhandled debugger vpacket: v" << name;
1167
1167
return false ;
1168
1168
}
1169
1169
@@ -1188,7 +1188,7 @@ bool GdbServerConnection::process_packet() {
1188
1188
inbuf.data () + packetend));
1189
1189
1190
1190
if (INTERRUPT_CHAR == inbuf[0 ]) {
1191
- LOG (debug) << " gdb requests interrupt" ;
1191
+ LOG (debug) << " debugger requests interrupt" ;
1192
1192
req = GdbRequest (DREQ_INTERRUPT);
1193
1193
inbuf.erase (inbuf.begin ());
1194
1194
return true ;
@@ -1205,21 +1205,21 @@ bool GdbServerConnection::process_packet() {
1205
1205
ret = process_bpacket (payload);
1206
1206
break ;
1207
1207
case ' c' :
1208
- LOG (debug) << " gdb is asking to continue" ;
1208
+ LOG (debug) << " debugger is asking to continue" ;
1209
1209
req = GdbRequest (DREQ_CONT);
1210
1210
req.cont ().run_direction = RUN_FORWARD;
1211
1211
req.cont ().actions .push_back (GdbContAction (ACTION_CONTINUE));
1212
1212
ret = true ;
1213
1213
break ;
1214
1214
case ' D' :
1215
- LOG (debug) << " gdb is detaching from us" ;
1215
+ LOG (debug) << " debugger is detaching from us" ;
1216
1216
req = GdbRequest (DREQ_DETACH);
1217
1217
ret = true ;
1218
1218
break ;
1219
1219
case ' g' :
1220
1220
req = GdbRequest (DREQ_GET_REGS);
1221
1221
req.target = query_thread;
1222
- LOG (debug) << " gdb requests registers" ;
1222
+ LOG (debug) << " debugger requests registers" ;
1223
1223
ret = true ;
1224
1224
break ;
1225
1225
case ' G' :
@@ -1239,12 +1239,12 @@ bool GdbServerConnection::process_packet() {
1239
1239
req.target = parse_threadid (payload, &payload);
1240
1240
parser_assert (' \0 ' == *payload);
1241
1241
1242
- LOG (debug) << " gdb selecting " << req.target ;
1242
+ LOG (debug) << " debugger selecting " << req.target ;
1243
1243
1244
1244
ret = true ;
1245
1245
break ;
1246
1246
case ' k' :
1247
- LOG (info) << " gdb requests kill, exiting" ;
1247
+ LOG (info) << " debugger requests kill, exiting" ;
1248
1248
write_packet (" OK" );
1249
1249
exit (0 );
1250
1250
case ' m' :
@@ -1255,7 +1255,7 @@ bool GdbServerConnection::process_packet() {
1255
1255
req.mem ().len = strtoul (payload, &payload, 16 );
1256
1256
parser_assert (' \0 ' == *payload);
1257
1257
1258
- LOG (debug) << " gdb requests memory (addr=" << HEX (req.mem ().addr )
1258
+ LOG (debug) << " debugger requests memory (addr=" << HEX (req.mem ().addr )
1259
1259
<< " , len=" << req.mem ().len << " )" ;
1260
1260
1261
1261
ret = true ;
@@ -1273,7 +1273,7 @@ bool GdbServerConnection::process_packet() {
1273
1273
req.target = query_thread;
1274
1274
req.reg ().name = GdbRegister (strtoul (payload, &payload, 16 ));
1275
1275
parser_assert (' \0 ' == *payload);
1276
- LOG (debug) << " gdb requests register value (" << req.reg ().name << " )" ;
1276
+ LOG (debug) << " debugger requests register value (" << req.reg ().name << " )" ;
1277
1277
ret = true ;
1278
1278
break ;
1279
1279
case ' P' :
@@ -1298,7 +1298,7 @@ bool GdbServerConnection::process_packet() {
1298
1298
req = GdbRequest (DREQ_GET_IS_THREAD_ALIVE);
1299
1299
req.target = parse_threadid (payload, &payload);
1300
1300
parser_assert (' \0 ' == *payload);
1301
- LOG (debug) << " gdb wants to know if " << req.target << " is alive" ;
1301
+ LOG (debug) << " debugger wants to know if " << req.target << " is alive" ;
1302
1302
ret = true ;
1303
1303
break ;
1304
1304
case ' v' :
@@ -1315,7 +1315,7 @@ bool GdbServerConnection::process_packet() {
1315
1315
req.mem ().data );
1316
1316
parser_assert (req.mem ().len == req.mem ().data .size ());
1317
1317
1318
- LOG (debug) << " gdb setting memory (addr=" << HEX (req.mem ().addr )
1318
+ LOG (debug) << " debugger setting memory (addr=" << HEX (req.mem ().addr )
1319
1319
<< " , len=" << req.mem ().len
1320
1320
<< " , data=" << to_string (req.mem ().data , 32 ) << " )" ;
1321
1321
@@ -1359,26 +1359,26 @@ bool GdbServerConnection::process_packet() {
1359
1359
}
1360
1360
parser_assert (' \0 ' == *payload);
1361
1361
1362
- LOG (debug) << " gdb requests " << (' Z' == request ? " set" : " remove" )
1362
+ LOG (debug) << " debugger requests " << (' Z' == request ? " set" : " remove" )
1363
1363
<< " breakpoint (addr=" << HEX (req.watch ().addr )
1364
1364
<< " , len=" << req.watch ().kind << " )" ;
1365
1365
1366
1366
ret = true ;
1367
1367
break ;
1368
1368
}
1369
1369
case ' !' :
1370
- LOG (debug) << " gdb requests extended mode" ;
1370
+ LOG (debug) << " debugger requests extended mode" ;
1371
1371
write_packet (" OK" );
1372
1372
ret = false ;
1373
1373
break ;
1374
1374
case ' ?' :
1375
- LOG (debug) << " gdb requests stop reason" ;
1375
+ LOG (debug) << " debugger requests stop reason" ;
1376
1376
req = GdbRequest (DREQ_GET_STOP_REASON);
1377
1377
req.target = query_thread;
1378
1378
ret = true ;
1379
1379
break ;
1380
1380
default :
1381
- UNHANDLED_REQ () << " Unhandled gdb request '" << inbuf[1 ] << " '" ;
1381
+ UNHANDLED_REQ () << " Unhandled debugger request '" << inbuf[1 ] << " '" ;
1382
1382
ret = false ;
1383
1383
}
1384
1384
/* Erase the newly processed packet from the input buffer. The checksum
@@ -1402,7 +1402,7 @@ void GdbServerConnection::notify_no_such_thread(const GdbRequest& req) {
1402
1402
* didn't notify gdb. Either way, the user should restart
1403
1403
* their debugging session. */
1404
1404
LOG (error) << " Targeted thread no longer exists; this is the result of "
1405
- " either a gdb or\n "
1405
+ " either a debugger or\n "
1406
1406
" rr bug. Please restart your debugging session and avoid "
1407
1407
" doing whatever\n "
1408
1408
" triggered this bug." ;
@@ -1443,7 +1443,7 @@ GdbRequest GdbServerConnection::get_request() {
1443
1443
#endif
1444
1444
1445
1445
if (!sniff_packet () && req.is_resume_request ()) {
1446
- /* There's no new request data available and gdb has
1446
+ /* There's no new request data available and the debugger has
1447
1447
* already asked us to resume. OK, do that (or keep
1448
1448
* doing that) now. */
1449
1449
return req;
@@ -1452,7 +1452,7 @@ GdbRequest GdbServerConnection::get_request() {
1452
1452
while (true ) {
1453
1453
/* There's either new request data, or we have nothing
1454
1454
* to do. Either way, block until we read a complete
1455
- * packet from gdb . */
1455
+ * packet from the debugger . */
1456
1456
read_packet ();
1457
1457
1458
1458
if (!connection_alive_) {
@@ -1464,7 +1464,7 @@ GdbRequest GdbServerConnection::get_request() {
1464
1464
* so the target has to do something. */
1465
1465
return req;
1466
1466
}
1467
- /* The packet we got was "internal", gdb details.
1467
+ /* The packet we got was "internal", debugger details.
1468
1468
* Nothing for the target to do yet. Keep waiting. */
1469
1469
}
1470
1470
}
0 commit comments