summaryrefslogtreecommitdiff
path: root/rda/unix/ChangeLog
blob: e0a974776295ea2124fe86eb81282180e4702f91 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
2005-03-10  Jim Blandy  <jimb@redhat.com>

	* configure.in: Provide description for STOCK_BREAKPOINTS for use
	in config.in.

	Merge changes from trunk, to make progressive branch-vs.-trunk
	diffs easier to generate.

	2005-03-10  Jim Blandy  <jimb@redhat.com>

	* Makefile.in, aclocal.m4: Regenerated with automake 1.9.4.

	Make config.in generated automatically again.
	* configure.in: Provide descriptions for all the preprocessor
	symbols we define.
	* configure: Regenerated.
	* config.in: Regenerated using autoheader.

	* linux-target.c (frv_fdpic_loadmap_addresses): Use '%lx' for
	unsigned long argument.

	2005-02-08  Kevin Buettner  <kevinb@redhat.com

	* td_thr_tls_get_addr_p): New static global.
	(thread_db_dlopen): Initialize ``td_thr_tls_get_addr_p''.
	(thread_db_get_gen): Add support for qGetTLSAddr packet.

	2004-12-13  Kevin Buettner  <kevinb@redhat.com>

	* thread-db.c (thread_db_get_thread_reg): Don't allow a successful
	return without first initializing ``reg''.
	(thread_db_set_thread_reg): Remove code intended to for
	thread_db_get_thread_reg().

	2004-11-18  Kevin Buettner  <kevinb@redhat.com>

	* thread-db.c (thread_db_set_thread_reg): Don't allow a successful
	return without first initializing ``reg''.

2005-03-10  Jim Blandy  <jimb@redhat.com>

	* linux-target.c (stock_table_to_frv, frv_table_to_stock,
	stock_bp_to_frv, frv_bp_to_stock, frv_make_bp_table, frv_set_bp,
	frv_delete_bp, frv_bp_hit_p): New functions.
	(frv_make_arch): Register the latter four as our breakpoint
	methods.
	(MAKE_ARCH): New #definition.
	* configure.in: Use stock-breakpoints.o on FRV Linux, too.
	* configure: Regenerated.

2004-12-03  Jim Blandy  <jimb@redhat.com>

	Disable debugging messages by default.
	* lwp-pool.c (debug_lwp_pool): Initialize to zero.
	* thread-db.c (thread_db_noisy): Same.

	Remove code to handle threads exiting without generating a wait
	status; that was a kernel bug, not an intended feature, and
	there's no easy way to support both.
	* lwp-pool.c (lwp_pool_continue_and_drop): Delete function.
	* lwp-pool.h (lwp_pool_continue_and_drop): Delete declaration.
	* thread-db.c (enum death_state): Delete type.
	(struct gdbserv_thread): Remove 'death_state' member.
	(add_thread_to_list): Don't initialize it.
	(death_state_str, debug_report_death_state_change,
	death_state_got_event, death_state_notified): Delete functions.
	(handle_thread_db_event): Don't handle death events specially, and
	don't handle the notifying thread specially.
	(continue_thread): Don't treat threads whose death has been
	foretold and who have completed their notification specially.

2004-12-02  Jim Blandy  <jimb@redhat.com>

	* lwp-pool.c: Doc fixes.  (Use "LWP" instead of "thread".)

	* thread-db.c (thread_db_open): Produce debugging output.

	* thread-db.c (thread_db_thread_info): Produce output that more
	closely resembles GDB's native thread output, to mollify the GDB
	test suite.

	* thread-db.c (thread_db_check_child_state): No need to call
	lwp_pool_stop_all twice; update_thread_list stops any new threads.

	* thread-db.c (thread_db_attach): Always preload the symbol list
	with the names of the symbols RDA uses itself.

	* thread-db.c (thread_db_break_program): New function.
	(thread_db_attach): Register it as the 'break_program' method.

	* ptrace-target.c (kill_lwp): Produce debugging output.

	* lwp-pool.c (check_stop_pending): lwp_state_stopped_interesting
	is not a legitimate state for the LWP to be in.

	Introduce a new STOPPED, STOP PENDING state to the LWP pool model.
	* lwp-pool.c: Many doc fixes.
	(enum lwp_state): Add new value, lwp_state_stopped_stop_pending.
	(lwp_state_str): Provide a name for it.
	(lwp_pool_waitpid): Reject it as an initial state for an LWP whose
	status we'll report.  Produce it when we report the status of a
	STOPPED, STOP PENDING, INTERESTING LWP, rather than continuing
	the LWP and waiting for it again.
	(lwp_pool_stop_all): Recognize it as a stopped state.
	(lwp_pool_continue_all, lwp_pool_continue_lwp,
	lwp_pool_singlestep_lwp): Continue and check for the boring status
	here, instead of in lwp_pool_waitpid.
	(lwp_pool_continue_and_drop_lwp): Just call lwp_pool_continue_lwp,
	instead of writing out its contents again here.

2004-11-29  Jim Blandy  <jimb@redhat.com>

	Move libthread_db event-based thread death logic from lwp-pool.c
	to thread-db.c, so the former can stay innocent of libthread_db's
	details, and limit itself to kernel behavior.
	* lwp-pool.h (lwp_pool_continue_and_drop_lwp): New declaration.
	(lwp_pool_thread_db_death_event,
	lwp_pool_thread_db_death_notified): Declarations deleted.
	* lwp-pool.c (enum death_state): Move to thread-db.c.
	(struct lwp): Delete 'death_state' member.
	(hash_find): Don't initialize it.
	(interesting_queue): Don't provide an initializer for it.
	(check_stop_pending): Don't abort if wait_and_handle didn't put
	the thread in a stopped state; that could be caused by kernel
	behavior (say, threads exiting silently), not necessarily a logic
	flaw in lwp-pool.c.
	(death_state_str, debug_report_death_state_change): Move to
	thread-db.c.
	(lwp_pool_thread_db_death_event,
	lwp_pool_thread_db_death_notified): Move to thread-db.c, and
	rename (see below).
	(check_for_exiting_nptl_lwp): Delete.
	(lwp_pool_continue_all, lwp_pool_continue_lwp): Don't call
	check_for_exiting_nptl_lwp.
	(lwp_pool_continue_and_drop_lwp): New function.
	* thread-db.c (enum death_state): Moved here from lwp-pool.c.
	(struct gdbserv_thread): New member death_state.
	(add_thread_to_list): Initialize it.
	(death_state_str, debug_report_death_state_change): Moved here
	from lwp-pool.c.
	(death_state_got_event, death_state_notified): Renamed from
	lwp_pool_thread_db_death_event and lwp_pool_thread_db_death_notified,
	and changed to update the death state of a 'struct gdbserv_thread'
	instead of a 'struct lwp'.
	(handle_thread_db_event): Call death_state_got_event instead of
	lwp_pool_thread_db_death_event, and death_state_notified instead
	of lwp_pool_thread_db_death_notified.
	(continue_thread): If the thread's death state indicates that it's
	going to disappear without further ado when continued, continue it
	with lwp_pool_continue_and_drop_lwp, not lwp_pool_continue_lwp.

	* lwp-pool.h (lwp_pool_singlestep_lwp, lwp_pool_continue_lwp): Doc
	fixes.

	* lwp-pool.c (wait_flags_str): Return "0" when FLAGS == 0, not the
	empty string.

2004-11-23  Jim Blandy  <jimb@redhat.com>

	Separate management of kernel-level LWPs from that of libpthread /
	libthread_db-level threads.
	* lwp-pool.c, lwp-pool.h: New files.
	* thread-db.c: #include "lwp-ctrl.h" and "lwp-pool.h".
	(struct gdbserv_thread): Delete members 'attached', 'stopped',
	'waited', and 'stepping'.  This structure is now just a
	'td_thrinfo_t' and a list link.  Describe some quirks in the
	meanings of certain 'ti' fields.
	(thread_list_lookup_by_lid): Move later in file, so we can use
	information directly from our proc handle.  Be skeptical of ZOMBIE
	or UNKNOWN threads whose LWP ID is equal to the PID in the proc
	handle.
	(thread_debug_name): Move later in file, so we can use
	thread_db_state_str.
	(attach_thread): Use lwp pool functions to attach.  Attach to
	zombies.  When using signal-based communication, send the thread
	the restart signal immediately.
	(find_new_threads_callback): Go ahead and attach to all threads.
	The LWP pool functions tolerate attaching to a given LWP more than
	once.
	(update_thread_list): Take the process as an argument.  If the
	focus thread has disappeared, set process->focus_thread to NULL.
	(thread_db_thread_next): Pass the process to update_thread_list.
	(stop_thread, stop_all_threads, add_pending_event,
	delete_pending_event, select_pending_event, send_pending_signals,
	wait_all_threads, continue_all_threads): Deleted.
	(handle_thread_db_event): Renamed from handle_thread_db_events.
	Take the process structure as an argument, and check only for a
	thread-db event notification from process->event_thread.  Use LWP
	pool functions.
	(continue_thread, singlestep_thread): Use LWP pool functions.
	(thread_db_continue_program, thread_db_singlestep_program,
	thread_db_continue_thread, thread_db_singlestep_thread): Use LWP
	pool functions, and update process->focus_thread appropriately.
	(thread_db_check_child_state): Use the LWP pool functions.  Rather
	than stopping all LWP's, choosing the most interesting events, and
	then arranging to re-create all the other wait statuses we got,
	just pick the first event we get from lwp_pool_waitpid (either on
	the focus thread, if there is one, or on any thread) and report
	that.  Use the new handle_thread_db_event function.
	(struct event_list, pending_events, pending_events_listsize,
	pending_events_top): Deleted; replaced by LWP pool code.
	(thread_db_attach): Tell the LWP pool about the PID we're
	attaching to.  Clear the focus thread.
	* server.h (struct process): New member: 'focus_thread'.
	* gdbserv-thread-db.h (continue_lwp, singlestep_lwp, attach_lwp,
	stop_lwp): Move declarations from here...
	* lwp-ctrl.h: ... to here.  New file.
	(kill_lwp): Renamed from stop_lwp; allow caller to specify any
	signal.
	* ptrace-target.c: #include "lwp-ctrl.h".
	(continue_lwp, singlestep_lwp, attach_lwp, stop_lwp): Move
	function comments to lwp-ctrl.h, and expand.
	* configure.in: Whenever we select 'thread-db.o', select
	'lwp-pool.o' as well.
	* configure: Regenerated.

	* thread-db.c (thread_db_check_child_state): Remove extraneous
	call to handle_waitstatus.  Remove extra check for exited main
	thread.
	
	* thread-db.c (thread_db_thread_info): List the type and state
	before the PID, and mention whether the LWP's PID is equal to that
	of the main thread, since ZOMBIE and UNKNOWN threads whose LWP's
	PID is equal are probably actually exited threads.
 	
	* thread-db.c (add_thread_to_list): Zero out entire structure.

	* thread-db.c (thread_db_state_str, thread_db_type_str): Remove
	spaces from names; we don't always want them, and the caller can
	use printf formatting directives to arrange things as they please.

	* ptrace-target.c (continue_lwp, singlestep_lwp, attach_lwp,
	stop_lwp): Change arguments from 'lwpid_t' to 'pid_t'.  lwpid_t is
	strictly a thread-db type; these are functions that use system
	calls, which all expect pid_t.  Rename arguments from 'lwpid' to
	'pid'.

	* ptrace-target.c: #define _GNU_SOURCE to get declaration for
	strsignal.
	(kill_lwp): Enhance error reporting.

2004-11-01  Jim Blandy  <jimb@redhat.com>

	* thread-db.c (delete_pending_event): Fix bounds-check assertion.

	* ptrace-target.c (stop_lwp): Use tkill when possible; otherwise,
	fall back gracefully to using kill.

2004-10-31  Jim Blandy  <jimb@redhat.com>

	* stock-breakpoints.c (stock_bp_make_table): Bother to return the
	breakpoint table constructed.

	* thread-db.c (thread_db_get_thread_reg): Delete unused variable.

	* stock-breakpoints.c: #include all headers necessary to get
	prototypes for functions used in this file.
	* thread-db.c: Same.

	* server.c (main): Initialize infd, outfd, and speed.
	(tty_raw): Use proper name for speed_t "zero baud" value.

	* linux-target.c (decr_pc_after_break): Fix printf format
	directive to match arguments.
	* ptrace-target.c (ptrace_singlestep_program): Same.
	(ptrace_continue_program): Same.
	* server.c (invalid_speed): Same.
	* thread-db.c (thread_db_open, wait_all_threads) 
	(thread_db_check_child_state, thread_db_get_thread_reg) 
	(thread_db_set_thread_reg): Same.

	* linux-target.c (linux_get_reg): When register REGNO doesn't exist, 
	provide zeros for its value; don't use an uninitialized pointer.

2004-10-29  Jim Blandy  <jimb@redhat.com>

	* linux-target.c (linux_set_reg): Delete unused variables.
	* ptrace-target.c (ptrace_read_user, ptrace_check_child_state):
	Same.
	* thread-db.c (continue_all_threads, thread_db_attach): Same.

	* linux-target.c (x86_make_arch): Use allocate_empty_arch.

	* linux-target.c: #include <string.h>, <sys/types.h>, and
	<sys/wait.h> to get declarations for system functions used in this
	file.

	* gdbserv-thread-db.h (stop_lwp, handle_waitstatus, ps_pdread,
	ps_pdwrite): Add declarations for these functions to
	gdbserv-thread-db.h.

	* Makefile.am (AM_CFLAGS): Add '-Wall'.
	* Makefile.in: Update.

2004-10-26  Jim Blandy  <jimb@redhat.com>

	Add an architecture object to the Unix server.
	* arch.h: New header file.
	* server.h (struct arch): New forward struct declaration.
	(struct child_process): Add an 'arch' member to the process.
	* thread-db.c: #include arch.h.
	* linux-target.c: #include arch.h.
	(allocate_empty_arch): New function.
	(x86_make_arch): New function.
	(MAKE_ARCH): New #definition.
	(linux_attach): Initialize process's architecture.

	Provide arch-independent framework for breakpoints.
	* server.h (struct arch_bp_table): New forward struct declaration.
	(struct child_process): New member: 'breakpoint_table'.
	* linux-target.c (linux_attach): Initialize process's breakpoint
	table, if the architecture defines a breakpoint table constructor.
	* arch.h (struct arch): Add fields pointing to breakpoint functions.

	Provide a module implementing breakpoints for architectures that
	support a simple software breakpoint model ("patch these bytes
	into the instruction stream").
	* stock-breakpoints.h, stock-breakpoints.c: New files.
	* linux-target.c: If STOCK_BREAKPOINTS is #defined, then #include
	"stock-breakpoints.h".
	* Makefile.am (EXTRA_rda_SOURCES): Add stock-breakpoints.c.
	* Makefile.in: Updated.

	Define x86 breakpoint functions using the stock-breakpoints.c
	model.
	* configure.in: When configuring for an x86 target, include
	stock-breakpoints.o in the mix, and #define STOCK_BREAKPOINTS.
	* configure: Regenerated.
	* config.in (STOCK_BREAKPOINTS): Provide #definition template.
	* linux-target.c (stock_table_to_x86, x86_table_to_stock,
	stock_bp_to_x86, x86_bp_to_stock, x86_make_bp_table, x86_set_bp,
	x86_delete_bp, x86_bp_hit_p): New functions.
	(x86_make_arch): Register the latter four as our breakpoint
	methods.

	Use the libthread_db event interface to communicate with the
	thread library, if the old signal-based interface is not
	supported.
	* thread-db.c: #include <assert.h>.
	(thread_db_event_str): New function.
	(get_target_int_by_name, set_target_int_by_name, get_thread_signals)
	(cancel_signal, restart_signal, debug_signal): Move these to just
	before thread_db_dlopen; get_thread_signals is a subroutine of that.
	(using_thread_db_events, create_notification, death_notification,
	create_event_breakpoint, death_event_breakpoint): New global vars.
	(get_event_notification, set_event_breakpoint)
	(insert_thread_db_event_breakpoints)
	(delete_thread_db_event_breakpoints, request_thread_db_events)
	(hit_thread_db_event_breakpoint): New functions.
	(thread_db_open): Call get_thread_signals, and if that fails, call
	request_thread_db_events.
	(struct event_list): Add 'thread_db_event' member.
	(add_pending_event): Initialize it.
	(delete_pending_event, handle_thread_db_events): New functions.
	(find_new_threads_callback): If we're using the event interface,
	enable event reporting on each new thread we find.
	(select_pending_event): Return a value to indicate whether we
	selected any event at all.
	(continue_all_threads): Send a restart signal only if we're using
	the signal-based interface.
	(thread_db_check_child_state): If we're using the libthread_db
	event interface to communicate with the inferior thread library,
	check for those events here.  If select_pending_event says it
	didn't find anything interesting, that means we consumed all the
	reportable events; continue the program silently.
	* ptrace-target.c: #include <sys/types.h> and <linux/unistd.h>.
	(tkill): Generate code for this syscall.
	(stop_lwp): Use tkill instead of kill.

	* thread-db.c (thread_db_check_child_state): Call stop_all_threads
	before calling update_thread_list, so RDA will have to compete for
	CPU with fewer running threads.
	
	* thread-db.c (wait_all_threads): Move calls to
	select_pending_event and send_pending_signals from here...
	(thread_db_check_child_state): To here.

	* thread-db.c (ignore_thread_signal): New function.
	(thread_db_check_child_state): Call it, instead of writing it out.

	* thread-db.c (thread_db_open): Return 0 on success, -1 on
	failure, like most of the other int-valued functions in this file,
	and like most system calls.

	* thread-db.c (struct gdbserv_thread): Doc fixes.

	* thread-db.c: #include "gdbserv-utils.h", to get prototypes for
	the 'struct gdbserv_reg' manipulation functions.
	
	* thread-db.c (thread_db_noisy): Initialize to 1.

	* thread-db.c (thread_debug_name): New function.
	(find_new_threads_callback): If noisy, report new threads.
	(stop_thread): If noisy, report stopping threads.
	(select_pending_event): If noisy, report what we selected.
	(wait_all_threads): If noisy, report before each thread we wait
	for.

	* thread-db.c (stop_all_threads): Doc fixes.
	
	* aclocal.m4: Regenerated.

2004-10-20  Jim Blandy  <jimb@redhat.com>

	Use the libthread_db 'td_symbol_list' function to look up all the
	symbols libthread_db will need when invited to by GDB.
	* thread-db.c (add_symbol_to_list): Make 'name' argument const.
	(td_symbol_list_p): New libthread_db function pointer.
	(thread_db_dlopen): Initialize it.
	(thread_db_attach): Use td_symbol_list to pre-load our symbol
	cache with the names of all the symbols libthread_db will ever
	request.

	* thread-db.c (thread_db_get_gen): There's no reason to try to
	open a thread agent until we've at least requested values for all
	the symbols we know about.

	* server.c (usage): Don't include the entire pathname in the usage
	message.

2004-10-19  Jim Blandy  <jimb@redhat.com>

	* thread-db.c (get_thread_signals): Doc fix.

	* thread-db.c (enum symbol_cache_defined): Move this definition
	above that of (struct symbol_cache), and give it a name.
	(struct symbol_cache): Use that enum as the type of 'defined_p', so
	the debugger will print symbol cache entries more helpfully.

	* ptrace-target.c (ptrace_create_child): Don't use sys_nerr to
	check that errno is in a valid range.  The use sys_nerr is
	deprecated on GNU/Linux, and according to the ISO C standard and
	POSIX, strerror always returns a valid string, even for invalid
	errno codes.

2004-10-07  Jim Blandy  <jimb@redhat.com>

	* Makefile.am (rda_DEPENDENCIES): Add ../lib/librda.la.
	* Makefile.in: Regenerated.

	* server.c (main): Check for an error return from
	gdbsocket_startup.

2004-09-22  Jim Blandy  <jimb@theseus.home>

	* thread-db.c (thread_db_open, thread_db_get_gen): Doc fixes.

	* thread-db.c (thread_db_detach, thread_db_set_gen,
	thread_db_thread_id): Make these functions static.

2004-09-13  Jim Blandy  <jimb@theseus.home>

	* solaris-target.c (solaris_detach, solaris_attach): Change
	"linux" to "solaris".

2004-08-11  Corinna Vinschen  <vinschen@redhat.com>

	* linux-target.c (linux_write_reg): Print process->pid in case of
	an error.

2004-07-19  Kevin Buettner  <kevinb@redhat.com>

	* server.c (main): Set ``server_quit_p'' when debugged process
	exits or terminates.

2004-06-03  Kevin Buettner  <kevinb@redhat.com>

	* server.c (main): Ensure that thread related realtime signals
	are ignored.

2004-04-20  Kevin Buettner  <kevinb@redhat.com>

	* thread-db.c (lookup_sym): New function.
	(thread_db_open): Print diagnostic message for failed dlopen()
	call.  Call lookup_sym() which will print diagnostic for failed
	dlsym() call.

2004-04-20  Kevin Buettner  <kevinb@redhat.com>

	* server.c (main): Ignore realtime signals.

2004-04-05  Kevin Buettner  <kevinb@redhat.com>

	* linux-target.c (reginfo) [FRV_LINUX_TARGET]: Add support for
	registers fsr0, acc0-acc7, accg0-accg7, msr0, msr1, gner0, gner1,
	fner0, and fner1.

2004-03-19  Kevin Buettner  <kevinb@redhat.com>

	* ptrace-target.c (ptrace_exit_program): Cause main loop to exit.
	* server.c (sys/types.h, sys/stat.h, fcntl.h, string.h, unistd.h)
	(ctype.h, termios.h): Include.
	(close_device, tty_raw, invalid_speed, parse_speed): New functions.
	(speed_table): New static global.
	(usage): Update usage message.
	(main): Add support for connecting to serial devices.

2004-03-10  Kevin Buettner  <kevinb@redhat.com>

	* linux-target.c (enum regset): Add constant OTHERREGS.
	(struct peekuser_pokeuser_reginfo): Add new field,
	alternate_register_read_write_method.  Adjust all initializers
	accordingly.
	(frv_fdpic_loadmap_addresses): New function.
	(PTRACE_GETFDPIC, PTRACE_GETFDPIC_EXEC, PTRACE_GETFDPIC_INTERP):
	Define.
	(reginfo) [FRV_LINUX_TARGET]: Use slots 132 and 133 for the
	loadmap registers.
	
2004-03-10  Kevin Buettner  <kevinb@redhat.com>

	* configure.in: Add "frv*linux*" to list of targets with thread
	support.
	* configure: Regenerate.
	* Makefile.in: Regenerate using "automake --cygnus --ignore-deps".

2004-03-10  Kevin Buettner  <kevinb@redhat.com>

	* ptrace-target.c (ptrace_create_child): Use vfork() instead of
	fork().  Use PTRACE_ATTACH to attach to an existing process.
	* server.c (usage): Update to include text about "-a".
	(main): Allow use of -a switch to attach to an existing process.

2003-11-14  Kevin Buettner  <kevinb@redhat.com>

	* config.in (FRV_LINUX_TARGET): Add.
	* configure.in (sys/user.h): Don't check for this header; it's
	not used.
	(frv*linux*): Add rudimentary support for FR-V Linux.
	* linux-target.c (PEEKUSER_POKEUSER_REGINFO, NUM_REGS, PC_REGNUM)
	(sign_extend, greg_offset_and_size, fpreg_offset_and_size)
	(noreg_offset_and_size, reginfo) [FRV_LINUX_TARGET]: Define.
	* configure, Makefile.in: Regenerate.

2003-09-10  Kevin Buettner  <kevinb@redhat.com>

	From Jimi Xenidis  <jimix@watson.ibm.com>:
	* linux-target.c (reginfo): The MQ register is for IBM POWER
	(pre-PowerPC) architecture, and is undefined in PPC GNU/Linux
	environment.

2003-05-09  Kevin Buettner  <kevinb@redhat.com>

	* linux-target.c (mips_singlestep): Don't any consider cop0 or cop1x
	instructions to be conditional branches.  Expand set of cop1
	opcodes considered to be conditional branches.

2003-05-08  Kevin Buettner  <kevinb@redhat.com>

	* linux-target.c (mips_singlestep): Don't interpret all coprocessor
	instructions as conditional branches.

2003-04-10  Kevin Buettner  <kevinb@redhat.com>

	* linux-target.c (NUM_REGS) [MIPS_LINUX_TARGET, MIPS64_LINUX_TARGET]:
	Bump to 72.
	(struct peekuser_pokeuser_reginfo) [MIPS_LINUX_TARGET]: Use
	PROTO_SIZE for ``bad'' and ``cause''.
	(struct peekuser_pokeuser_reginfo) [MIPS_LINUX_TARGET]
	[MIPS64_LINUX_TARGET]: Add ``fir'' register.

2003-02-07  Kevin Buettner  <kevinb@redhat.com>

	* gdbserv-thread-db.h (singlestep_lwp): Add ``struct gdbserv *''
	argument.  Adjust all callers.
	(mips_singlestep) [MIPS_LINUX_TARGET, MIPS64_LINUX_TARGET]: New
	function.
	* linux-target.c (reginfo) [MIPS64_LINUX_TARGET]: Adjust some
	of the fpregset/gregset related constants in this table.
	(mips_get_reg): Add ``struct gdbserv *'' argument.  Adjust all
	callers.
	(mips_addr_as_reg, mips_peek_instruction, mips_poke_instruction):
	New functions.
	(mips_singlestep_program): Move bulk of implementation to and call...
	(mips_singlestep): ...new function.  This new function no longer
	makes any direct PTRACE_PEEKTEXT or PTRACE_POKETEXT operations.
	Shadow breakpoint information is also stored in a slightly different
	format.
	* ptrace-target.c (server.h, ptrace-target.h): Adjust location
	of #include statements so that gdbserv.h is included first.
	(handle_waitstatus): Call ptrace_set_mem() instead of invoking
	ptrace() directly.  Also adjust code to use somewhat different
	shadow breakpoint structs.
	(ptrace_set_mem, ptrace_get_mem): Remove ``static'' qualifier
	from function declarators.
	(singlestep_lwp): Add ``struct gdbserv *'' argument.
	* ptrace-target.h (ptrace_get_mem, ptrace_set_mem): Declare.
	* server.c (gdbserv.h): Include.
	* server.h (struct ss_save): Add field ``in_use''.  Change
	type of field ``ss_addr'' to struct ``gdbserv_reg''.
	* thread-db.c (wait_all_threads): Revise diagnostic message to
	print signal number for SIGDEBUG signal.
	(singlestep_thread): Add ``struct gdbserv *'' argument.  Adjust
	all callers.

2003-01-22  Kevin Buettner  <kevinb@redhat.com>

	* linux-target.c (struct peekuser_pokeuser_reginfo)
	[MIPS64_LINUX_TARGET, MIPS_LINUX_TARGET]: Disable registers ``cause''
	and ``bad'' since they are not writable via ptrace().

2003-01-19  Alexandre Oliva  <aoliva@redhat.com>

	* linux-target.c: Don't assume asm-mips/ is available, use just
	asm instead.

2003-01-17  Kevin Buettner  <kevinb@redhat.com>

	* configure.in (mips64*linux*n64, mips64*linux*n32, mips64*linux*o32):
	Remove cases.  Instead, use compiler's preprocessor symbols to test
	which ABI is being used.
	* configure: Regenerate.

2003-01-16  Kevin Buettner  <kevinb@redhat.com>

	* config.in (LIBTHREAD_DB_SO): New macro.
	* configure.in (mips64*linux*): Remove no-threads.o from
	TARGET_MODULES list.  Add thread-db.o to this list.
	* configure: Regenerate.

2003-01-10  Kevin Buettner  <kevinb@redhat.com>

	* Makefile.in: Regenerate using "automake --cygnus --ignore-deps".
	Someday, when ``depcomp'' is added to the top level, the
	--ignore-deps flag can be discarded.

2002-12-18  Kevin Buettner  <kevinb@redhat.com>

	* ptrace-target.h, ptrace-target.c (ptrace_write_user)
	(ptrace_read_user): Add struct gdbserv argument.
	* linux-target.c: Fix all callers.
	* ptrace-target.c (ptrace_write_user, ptrace_read_user): Add
	debugging printf()s.
	(ptrace_xfer_mem): Fix debugging printf()s so that they'll print
	useful results when sizeof (long long) is the same as
	sizeof (ptrace_xfer_type).
	(ptrace_xfer_mem): Decode address using gdbserv_host_bytes_from_reg()
	instead of gdbserv_reg_to_ulong().

2002-12-02  Kevin Buettner  <kevinb@redhat.com>

	* linux-target.c (linux_get_reg, linux_set_reg, reg_from_regset)
	(reg_to_regset, get_regset, put_regset reg_from_gregset)
	(reg_to_gregset, reg_from_fpregset, reg_to_fpregset)
	(reg_from_xregset, reg_to_xregset): Adjust all calls to
	gdbserv_host_bytes_to_reg() and gdbserv_host_bytes_from_reg()
	to account for change in interface.  Remove code which is
	no longer needed due to improvements in the aforementioned
	functions.
	(sign_extend): New constant.
	(FPR_BASE, PC, CAUSE, BADVADDR, MMHI, MMLO, FPC_CSR, FPC_EIR):
	Make sure these are defined.
	(PROTO_SIZE): Define.
	(reginfo) [MIPS_LINUX_TARGET]: Use PROTO_SIZE to initialize
	table with size (width) of registers to use when communicating
	with the client.
	(NUM_REGS, PC_REGNUM, reginfo) [MIPS64_LINUX_TARGET]: Define.

2002-11-19  Michael Snyder  <msnyder@redhat.com>

	* ptrace-target.c: Fix typo in copyright.

2002-08-23  Kevin Buettner  <kevinb@redhat.com>

	* linux-target.c (linux_get_reg, linux_set_reg): Print an
	error message for out of bound registers.

2002-08-23  Kevin Buettner  <kevinb@redhat.com>

	* linux-target.c (NUM_REGS) [X86_LINUX_TARGET]: Bump to 42.
	(getregs_setregs_reginfo) [X86_LINUX_TARGET]: Add entry for
	register ``orig_eax''.
	(linux_get_reg, linux_set_reg): Make sure ``regno'' value is valid.
	(linux_detach, linux_attach, decr_pc_after_break): Call fprintf()
	instead of printf().
	(linux_detach, linux_attach): Don't always print informational
	messages.
	* ptrace-target.c (handle_waitstatus, ptrace_detach, ptrace_attach):
	Don't always print informational messages.  Use fprintf() instead
	of printf().
	(noop_get_trap_number, noop_compute_signal, noop_exit_program)
	(noop_signlestep_program, noop_break_program): Delete.
	(ptrace_flush_i_cache): Renamed from noop_flush_i_cache.  Update
	reference in ptrace_attach().
	(continue_lwp, singlestep_lwp, attach_lwp, stop_lwp, ps_pstop)
	(ps_continue, ps_lstop): Use fprintf() instead of printf().
	* server.c (errno.h): Include.
	(usage): New function.
	(main): Add option processing code.
	* server.h (struct child_process): Add new field,
	``debug_informational''.
	* thread-db.c (ps_plog, select_pending_event, send_pending_signals)
	(wait_all_threads, thread_db_check_child_state): Use fprintf()
	instead of printf().
	(thread_db_detach): Conditionally print informational messages.
	Use fprintf() instead of printf().

2002-08-21  Kevin Buettner  <kevinb@redhat.com>

	* Makefile.am, configure.in, dummy-target.c, linux-target.c,
	ptrace-target.c, ptrace-target.h, server.h, solaris-target.c,
	thread-db.c: Change ``libremote'' references into ``RDA''
	references.
	* Makefile.in, configure: Regenerate.

2002-08-15  Kevin Buettner  <kevinb@redhat.com>

	* dummy-target.c, gdb_proc_service.h, gdbserv-thread-db.h,
	linux-target.c, no-threads.c, ptrace-target.c,
	ptrace-target.h, server.c, server.h, solaris-target.c,
	thread-db.c: Update copyright notices.

2002-05-16  Kevin Buettner  <kevinb@redhat.com>

	* config.in (GREGSET_T): Renamed from GDB_GREGSET_T.
	(FPREGSET_T): Renamed from GDB_FPREGSET_T.
	* configure.in: Likewise.
	* gdbserv-thread-db.h: Likewise.
	* linux-target.c: Likewise.
	* thread-db.c: Likewise.
	* gdb_proc_service.h: Remove everything that's not absolutely
	needed.

2002-02-01  Kevin Buettner  <kevinb@redhat.com>

	* configure.in (arm32): Change to ``yes''.
	* configure: Regenerate.

2002-01-30  Kevin Buettner  <kevinb@redhat.com>

	* linux-target.c (linux_get_reg) [GETREGS_SETREGS_REGINFO]: Add
	NOREGS support.
	(linux_set_reg) [GETREGS_SETREGS_REGINFO]: Likewise.

2002-01-28  Kevin Buettner  <kevinb@redhat.com>

	* linux-target.c (write_reg_bytes): Print return status in
	ptrace failure message.
	* ptrace-target.c (ptrace_write_user): Enable existing 
	Linux/MIPS related kernel bug workaround when MIPS_LINUX_TARGET
	is defined (which is in addition to _MIPSEL).

2002-01-28  Kevin Buettner  <kevinb@redhat.com>

	* thread-db.c (struct regset_cache): New struct declaration.
	(thread_db_map_id2thr_cache_valid, fpregset_cache, gregset_cache):
	New static globals.
	(thread_db_map_id2thr, thread_db_invalidate_map_id2thr_cache)
	(initialize_regset_cache, initialize_regset_caches)
	(thread_db_flush_regset_cache, thread_db_flush_regset_caches)
	(thread_db_get_regset, thread_db_set_regset)
	(thread_db_invalidate_regset_cache, thread_db_invalidate_regset_caches)
	(thread_db_invalidate_caches, thread_db_getfpregs)
	(thread_db_set_fpregs, thread_db_getgregs, thread_db_setgregs)
	(td_thr_getfpregs_wrapper, td_thr_getgregs_wrapper)
	(td_thr_setfpregs_wrapper, td_thr_setgregs_wrapper):
	New functions.
	(update_thread_list, thread_db_get_thread_reg)
	(thread_db_set_thread_reg): Call thread_db_map_id2thr() instead of
	td_ta_map_id2thr_p().
	(thread_db_get_thread_reg): Call thread_db_getfpregs() instead
	of td_thr_getfpregs_p().  Call thread_db_getgregs() instead of
	td_thr_getgregs_p().
	(thread_db_set_thread_reg): Likewise.  Also, call
	thread_db_setfpregs() instead of td_thr_setfpregs_p() and
	call thread_db_setgregs() instead of td_thr_setgregs_p().
	(continue_thread, thread_db_continue_program)
	(thread_db_singlestep_program, thread_db_continue_thread)
	(singlestep_thread): Call thread_db_flush_regset_caches() at
	beginning of function and thread_db_invalidate_caches() at
	end of function.
	(thread_db_attach): Initialize regset caches.

2002-01-15  Kevin Buettner  <kevinb@redhat.com>

	* config.in (Generated automatically comment): Revise to note
	that this file was generated automatically at one time, but is
	no longer.
	(LINUX_TARGET, SOLARIS_TARGET): Fix comments.
	(MIPS_LINUX_TARGET): Add.
	* configure.in (i?86*linux*, powerpc*linux*, arm*linux*, mips*linux*):
	Eliminate unnecessary duplication.
	(mips*linux*): Target is MIPS_LINUX_TARGET, not SH_LINUX_TARGET.
	* gdbserv-thread-db.h (is_gp_reg): New function.
	(is_fp_reg, is_extended_reg): Revise comments.
	* linux-target.c (enum regset): Add new constant NOREGS.
	(is_gp_reg): New function.
	(PEEKUSER_POKEUSER_REGINFO) [MIPS_LINUX_TARGET]: Define.
	(SIZEOF_REGMAP, SIZEOF_MAPPEDREG) [MIPS_LINUX_TARGET]: Delete.
	(NUM_REGS) [MIPS_LINUX_TARGET]: Change from 38 to 70 to account
	for addition of floating point support.
	(regmap) [MIPS_LINUX_TARGET]: Delete this array.
	(is_fp_reg, is_extended_reg) [MIPS_LINUX_TARGET]: Delete.
	(reginfo) [MIPS_LINUX_TARGET]: Define.
	(DEBUG): Delete this macro definition.
	(disp_gdb_mesg, ptrace_get_mem, ptrace_set_mem): Delete function
	declarations.
	(linux_get_reg, linux_set_reg) [PEEKUSER_POKEUSER_REGINFO]: Add
	NOREGS support.
	(put_regset) [PEEKUSER_POKEUSER_REGINFO]: Add missing return
	statement.
	(mips_get_reg): Use read_reg_bytes() to fetch the register.
	(mips_singlestep_program): Eliminate unused variables ``u_regs_base'',
	``temp_reg''.  Fix fprintf related format warning.
	* ptrace-target.h (ptrace_check_child_state): Declare.
	* thread-db.c (thread_db_get_thread_reg, thread_db_set_thread_reg):
	Handle case of target not supporting one or more registers.

2001-10-15  Kevin Buettner  <kevinb@redhat.com>

	* gdbserv-thread-db.h (is_extended_reg, reg_to_xregset)
	(reg_from_xregset): New functions.
	(debug_get_pc, decr_pc_after_break): Add declaration.
	* linux-target.c (sys/procfs.h): Include.
	(MAX_REG_SIZE): New anonymous enum constant.
	(enum regset): New enum.
	(getregs_setregs_reginfo, peekuser_pokeuser_reginfo): New structs.
	(offsetof, fieldsize): New macros.
	(ARM_LINUX_TARGET, X86_LINUX_TARGET, PPC_LINUX_TARGET): Deleted
	old data structures defining register maps for these registers.
	Replaced with new tables using either getregs_setregs_reginfo
	or peekuser_pokeuser_reginfo structs.  Other architectures
	remain the same, though reoranized somewhat.
	(linux_next_gg_reg, linux_gg_reg_nr): Revise comments.  Use
	NUM_REGS instead of NUM_G_PACKET_REGS.
	(get_xregsetsize): New function.
	(linux_reg_format, linux_sizeof_reg, is_fp_reg, is_extended_reg)
	[PEEKUSER_POKEUSER_REGINFO, GETREGS_SETREGS_REGINFO]: New functions.
	(read_reg_bytes, write_reg_bytes, debug_get_reg, debug_get_pc)
	(linux_get_reg, linux_set_reg, reg_from_regset, reg_to_regset)
	(reg_from_gregset, reg_to_gregset, reg_from_fpregset, reg_to_fpregset)
	(reg_from_xregset, reg_to_xregset, get_regset, put_regset, get_gregset)
	(put_gregset, get_fpregset, put_fpregset, get_xregset, put_xregset)
	[PEEKUSER_POKEUSER_REGINFO]: New functions.
	(read_reg_as_ulong, write_reg_as_ulong, debug_get_reg, debug_get_pc)
	(linux_get_reg, linux_set_reg, regs_from_gregset, regs_to_gregset)
	(reg_from_fpregset, reg_to_fpregset, reg_from_xregset, reg_to_xregset)
	(get_gregset, put_gregset, get_fpregset, put_fpregset, get_xregset)
	(put_xregset) [GETREGS_SETREGS_REGINFO]: New functions.
	(linux_process_get_regs, linux_process_get_reg, linux_process_set_reg)
	(linux_process_set_regs, ppc_linux_process_set_reg)
	(ppc_linux_process_get_reg, ppc_linux_process_set_regs)
	(ppc_linux_process_get_regs): Deleted.
	(linux_attach): Reorganize initializations.
	(generic_linux_set_reg): Renamed to linux_set_reg.
	(generic_linux_get_reg): Renamed to linux_get_reg.
	(generic_linux_sizeof_reg): Renamed to linux_sizeof_reg.
	(generic_linux_gg_reg_nr): Renamed to linux_gg_reg_nr.
	(generic_linux_next_gg_reg): Renamed to linux_next_gg_reg.
	(generic_linux_reg_format): Renamed to linux_reg_format.
	(decr_pc_after_break): Consolidated versions of this function
	down to two; one for x86 and one for everything else.  Also,
	add ``serv'' parameter and fix all callers.
	(debug_get_pc, debug_get_reg): Now only three versions of
	this function, one for PEEKUSER_POKEUSER_REGINFO code,
	one for GETREGS_SETREGS_REGINFO code, and one for legacy
	code.  Also, debug_get_pc() now takes a ``serv'' parameter.
	Fixed all callers.
	(ps_lgetregs): Use new get_gregset() interface.
	(ps_lsetregs): Use new put_gregset() interface.
	(ps_lgetfpregs, ps_lsetfpregs, ps_lgetxregsize, ps_lgetxregs)
	(ps_lsetxregs): Implement.
	* ptrace-target.c (ptrace_read_user, ptrace_write_user): Make
	``buff'' argument of type ``void *'' instead of ``char *''.
	(ptrace_get_gregs): Add new parameter ``alt_pid''.
	(ptrace_set_gregs): Likewise.
	(ptrace_get_fpregs): Add new parameter alt_pid.  Also fix call
	to ptrace() so parameters are in correct order.
	(ptrace_set_fpregs): Likewise.
	(ptrace_get_fpxregs, ptrace_set_fpxregs): New functions.
	* ptrace-target.h (ptrace_write_user, ptrace_read_user)
	(ptrace_get_gregs, ptrace_set_gregs, ptrace_get_fpregs)
	(ptrace_set_fpregs, ptrace_get_fpxregs, ptrace_set_fpxregs):
	Declare.
	* thread-db.c (td_thr_getxregsize_p, td_thr_getxregs_p)
	(td_thr_setxregs_p): New function pointers.
	(thread_db_dlopen): Initialize new function pointers.
	(send_pending_signals): Add ``process'' parameter so that
	decr_pc_after_break() can get the ``serv'' argument.  Fix all
	callers.
	(thread_db_get_thread_reg, thread_db_set_thread_reg): Add xregset
	support.

2001-10-14  Kevin Buettner  <kevinb@redhat.com>

	* ptrace-target.c (unistd.h): Include.
	(close_open_files): New function.
	(ptrace_create_child):  In newly forked child process, call
	close_open_files() before invoking execv().

2001-10-13  Kevin Buettner  <kevinb@redhat.com>

	* server.c (signal.h): Include.
	(chld_handler): New function.
	(main): Establish chld_handler as the SIGCHLD signal handler.
	Also, wait 1 second instead of 0 seconds to avoid busy waiting.

2001-09-26  Louis Hamilton  <hamilton@redhat.com>

	* configure.in: Use thread-db.c for ARM.
	* configure: Regenerated.
	* linux-target.c (ARM_R11, ARM_R12): Added to regmap[].
	(ARM_FP, ARM_CPSR): Revised mappings of these ARM registers.
	(debug_get_reg, debug_get_pc, decr_pc_after_break) [ARM_LINUX_TARGET]:
	New functions.
	
2001-09-20  Kevin Buettner  <kevinb@redhat.com>

	* configure.in: Use thread-db.c for Linux/PPC too.
	* configure: Regenerated.
	* linux-target.c (linux_read_reg): Add forward declaration.
	(debug_get_reg, debug_get_pc, decr_pc_after_break) [PPC_LINUX_TARGET]:
	New functions.

2001-09-20  Kevin Buettner  <kevinb@redhat.com>

	* linux-target.c (SIZEOF_MAPPEDREG) [PPC_LINUX_TARGET]: Add comment.
	(PC_REGNUM) [PPC_LINUX_TARGET]: Remove FIXME comment.
	(is_fp_reg) [PPC_LINUX_TARGET]: Revise upper bound on floating
	point register numbers.
	(ppc_linux_getset_reg): Rewritten to use regmap[] to fetch
	ptrace() offsets.  This'll handle the (previously unsupported)
	floating point registers, cr, lr, ctr, and xer.
	(ppc_linux_process_set_regs, ppc_linux_process_get_regs): Don't
	hardcode loop upper bound.
	(ppc_linux_process_get_regs): Revise declarator to match
	process_get_regs member in struct gdbserv_target.

2001-09-18  Andrew Haley  <aph@cambridge.redhat.com>

        * server.c (main): Work around SIGCHLD problem.

2001-08-05  Michael Chastain  <chastain@redhat.com>

	* ptrace-target.c (ptrace_write_user): Ignore ESRCH on MIPS,
	because mips linux kernel 2.4 has a bug where PTRACE_POKEUSER
	returns -ESRCH even when it succeeds.

2001-08-03  Michael Keezer  <mkeezer@redhat.com>

        * configure.in: Add am33_2.0 & mn10300.
        * config.in: Add AM33_LINUX_TARGET & AM33_2_0_LINUX_TARGET.
        * linux-target.c: am33_2.0 & mn10300 support.

2001-07-23  David Howells  <dhowells@redhat.com>

	* ptrace-target.c: Added big-endian MIPS support.
	* linux-target.c: ditto.
	* server.h: ditto.

2001-06-25  Michael Snyder  <msnyder@redhat.com>

	* ptrace-target.c (ptrace_compute_signal): Implement conversion 
	from native signals to GDB's signal numbering.
	(ptrace_process_signal): Implement conversion from GDB's signal
	numbering to native signals.
	(stop_lwp): Comment out debugging output of SIGSTOP signals.
	* linix-target.c (linux_fromtarget_break): Call compute_signal.
	(linux_fromtarget_terminate): Ditto.
	* thread-db.c (thread_db_check_child_state): Don't do any conversion
	when passing a signal directly back to the inferior; just copy from
	stop_signal to signal_to_send.
	(thread_db_fromtarget_thread_break): Convert signal from native
	numbering to GDB's numbering.

2001-06-18  Michael Snyder  <msnyder@redhat.com>

	* linux-target.c (generic_linux_set_reg): Fix typo.
	(decr_pc_after_break): Mute the debugging output.

2001-06-15  Michael Snyder  <msnyder@redhat.com>

	* thread_db.c: Disable noisy debugging output.
	(select_pending_event): Add new selection criterion, giving
	preference to a thread that is being single-stepped.  This 
	avoids the problem of deciding whether to decrement the pc if
	we don't know whether a SIGTRAP was caused by stepping or by
	hitting a breakpoint.

2001-06-14  Michael Snyder  <msnyder@redhat.com>

	* thread-db.c (thread_db_set_gen, thread_db_get_gen): Rewrite
	syntax for qSymbol messages.
	* gdb_proc_service.h: New file.
	* Makefile.am (INCLUDES): Remove $(srcdir)/../../include.
	* Makefile.in: Regenerate.

2001-05-31  Michael Snyder  <msnyder@redhat.com>

	* thread-db.c (add_thread_to_list): Return explicit value!

2001-05-23  Jackie Smith Cashion <jsmith@redhat.com>

	* linux-target.c: Change MIPS SIZEOF_MAPPEDREG from 1 to 4.
	(linux_register_offset): For MIPS return regmap[regnum] instead of
	SIZEOF_MAPPEDREG * regmap[regnum].
	(mips_get_reg): Pass pid as argument to ptrace_read_user instead of
	gdbserv pointer.
	
2001-05-22  Michael Snyder  <msnyder@redhat.com>

	* no-threads.c: New file.
	* configure.in: Use thread-db.c only for specified architectures, 
	(including x86); otherwise default to using no-threads.c.
	* configure: Regenerate.
	
2001-05-10  Martin M. Hunt  <hunt@redhat.com>	

	* linux-target.c (is_fp_reg): New function for mips. 
	FP not implemented.
	
	Merged changes from symbol branch with appropriate modifications.

Mon Mar 26 08:54:41 PST 2001  Brendan Conoboy <blc@redhat.com>
 
	* configure.in: Added mipsvr4181el* target
	* configure: regenerate
 
2001-01-26  Rudy Folden <rfolden@redhat.com>
 	
	* server.c: Changed name from gdbgeneral_xxx to gdbconnect_xx.
 
2001-01-24  Rudy Folden <rfolden@redhat.com>
 
	* configure: Added mipsel* target.
	* linux-target.c: Add support for MIPS processor, including single-
	stepping which doesn't exist in mips ptrace.
	* ptrace-target.c (ptrace_handle_waitstatus): Added single-stepping
	instruction restore for mips.
	(ptrace_attach): Added single stepping initialization code.
	* server (main): Added generic interfaces, gdbgeneral_startup/shutdown
	for serial or tcp/ip selection. Also added server_quit_p to X and W 
	for serial support (no socket shutdown).
	* server.h (child_process): Added mips instruction save area for
	single-step support.

	2001-01-10  Rudy Folden <rfolden@redhat.com>
	* ptrace-target.c (enum): Added U_REGS_OFFSET to processor
	dependent enums.

2001-04-26  Michael Snyder  <msnyder@redhat.com>

	* linux-target.c (is_fp_reg): New function.
	(reg_from_fpregset, reg_to_fpregset): New functions.
	Support for thread_db_get_thread_reg floating point regs.
	* thread-db.c (thread_db_get_thread_reg, thread_db_set_thread_reg):
	Infrastructure for support of floating point regs.
	(Attach_thread): New function, abstracted from below.
	(find_new_threads_callback): Call attach_thread.
	(stop_thread): New function, abstracted from stop_all_threads.
	(stop_all_threads): Call stop_thread.
	(continue_thread): Test for lwp == 0 before calling continue_lwp.
	* ptrace-target.c (stop_lwp): New function.
	* gdbserv-thread-db.h (reg_to_regnum, reg_from_regnu): Declare.

2001-04-25  Michael Snyder  <msnyder@redhat.com>

	Move all ptrace references out of thread-db.c.
	* gdbserv-thread-db.h: New file.
	* thread-db.c (struct ps_prochandle): Move to gdbserv-thread-db.h.
	(gdb_ps_prochandle_t): Ditto.
	(gdb_ps_read_buf_t, gdb_ps_write_buf_t, gdb_ps_size_t): Ditto.
	(ps_pstop, ps_pcontinue): Move to ptrace-target.c.
	(ps_lstop, ps_lcontinue): Ditto.
	(ps_pdread, ps_pdwrite, ps_ptread, ps_ptwrite): Ditto.
	(ps_lgetxregsize): Move to linux-target.c.
	(ps_lgetxregs, ps_lsetxregs, ps_getpid): Ditto.
	(ps_lgetregs, ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Ditto.
	(find_new_threads_callback): Abstract attach bits into new function
	attach_lwp, and move that to ptrace-target.c.
	(wait_all_threads): Call continue_lwp instead of ptrace.
	(continue_pid): Rename as continue_lwp, move into ptrace-target.c.
	(singlestep_pid): Rename as continue_lwp, move into ptrace-target.c.
	(struct symbol_cache): Change value to a paddr_t.
	(add_symbol_to_list, lookup_cached_symbol): Ditto.
	* linux-target.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs, 
	ps_lsetfpregs, ps_lgetxregsize, ps_lgetxregs, ps_lsetxregs,
	ps_getpid): Moved to here from thread-db.c.
	* ptrace-target.c (continue_lwp, singlestep_lwp, attach_lwp,
	(ps_pstop, ps_pcontinue, ps_lstop, ps_lcontinue, ps_pdread,
	ps_pdwrite, ps_ptread, ps_ptwrite): Moved here from thread-db.c.
	(ptrace_handle_waitstatus): Renamed as handle_waitstatus.
	(ps_lcontinue): Implement (untested).
	* server.c (main): Check server_quit_p after calling gdbloop_poll.


2001-04-24  Michael Snyder  <msnyder@redhat.com>

	* thread-db.c (continue_pid, continue_thread): New functions.
	(singlestep_pid, singlestep_thread): New functions.
	(continue_all_threads): Use new function continue_thread.
	(thread_db_continue_program): Ditto.
	(thread_db_singlestep_program): Ditto.
	(thread_db_continue_thread): Ditto.
	(thread_db_singlestep_thread): Ditto.
	
	* thread-db.c: Remove some debugging printfs.
	Add activation and handling of the thread debug signal.
	(get_thread_signals): Get the debug signal as well as the others.
	Set target flag to activate the debug signal.
	(set_target_int_by_name): New function.
	(struct gdbserv_thread): Rename "sigstopped" flag to just "stopped".
	(stop_all_threads): Mark the event thread "stopped".
	(wait_all_threads): Mark the event thread "waited".
	Don't stash the debug signal (throw it away).
	(continue_all_threads): Always send the restart signal to any
	thread that has just been attached.
	(thread_db_check_child_state): Make two calls to waitpid (one with
	WCLONE, one without) instead of alternating every other time.
	Add debug_signal to the list of events to ignore.
	(thread_db_attach): Add "__pthread_threads_debug" to list of symbols.

2001-04-20  Michael Snyder  <msnyder@redhat.com>

	* thread-db.c (thread_db_check_child_state): Add SIGCHLD to the
	list of signals to ignore.  When a thread exits, make sure that
	the other threads get restarted.

2001-04-19  Michael Snyder  <msnyder@redhat.com>

	* thread-db.c (wait_all_threads): Save exit and term events.
	Save SIGINT like any other signal event.  
	(send_pending_signals): Don't send SIGINT.
	(select_pending_event): Give preference to SIGINT.
	(thread_db_check_child_state): Move special handling of 
	cancel and restart signals to after the stop_all_threads
	and wait_all_threads calls, so we can catch these signals
	even if they aren't the first signal we get notification of.

2001-04-19  Michael Snyder  <msnyder@redhat.com>

	Major change to select an event so as to avoid starvation.
	* thread-db.c (select_pending_event): New function.  Choose an
	event from the list of pending events, and make its thread the
	event thread.
	(stop_all_threads): Don't mark the event thread.  That will now
	be done by select_pending_event.
	(struct signal_list): Rename to event_list.  Save the thread and
	the entire wait status, so that all events (not just signals)
	can be saved.
	(add_pending_signal): Rename to add_pending_event.
	(send_pending_signals): Ignore non-signal events.
	Ignore the selected event (which will be returned to the debugger).
	Push back breakpoint events (moved here from wait_all_threads).
	(wait_all_threads): Remove special handling for SIGTRAP (moved
	into send_pending_signals).  Call select_pending_event.
	(thread_db_check_child_status): Add initial event to event list.

2001-04-16  Michael Snyder  <msnyder@redhat.com>
	* thread-db.c (thread_db_continue_thread): Handle the signal param.
	(thread_db_singlestep_thread): Ditto.
	(thread_db_check_child_state): Handle exit and termination separately.

2001-04-13  Michael Snyder  <msnyder@redhat.com>

	* thread-db.c (find_new_threads_callback): Account for dead threads.
	(update_thread_list): Keep zombie threads in thread list, but
	delete them if they've been joined or detached.
	(stop_all_threads): Don't stop dead threads.
	(continue_all_threads): Don't continue if not waited.
	(thread_db_check_child_state): Move handling of terminate and
	exit earlier.  Handle termination or exit of children specially.
	(thread_db_get_thread_reg): Test for defunct threads.
	(thread_db_set_thread_reg): Ditto.
	* ptrace-target.c (ptrace_xfer_mem): Don't be noisy about ptrace
	errors caused by illegal memory accesses.

2001-04-12  Andrew Cagney  <ac131313@redhat.com>

	* server.c: Include "gdbloop.h".  Replace gdbsocket_poll with
	gdbloop_poll.
	* ptrace-target.c, linux-target.c, solaris-target.c: 
	* dummy-target.c: Update comments.

2001-04-11  Michael Snyder  <msnyder@redhat.com>

	* thread-db.c (struct gdbserv_thread): Add new flag 'stepping'.
	(stop_all_threads): Add parameter 'process'.
	Set the process->event_thread here, instead of in check_child_state.
	(wait_all_threads): Accept process as a parameter instead of eventpid.
	Handle SIGTRAP differently if the thread was singlestepping.
	(thread_db_singlestep_program): Clear flags for event thread.
	(thread_db_singlestep_thread): Ditto.
	(thread_db_continue_program): Ditto.
	(thread_db_continue_thread): Ditto.
	(thread_db_check_child_state): Cancel the stepping flag.
	Don't set the event thread, this is now done in stop_all_threads.
	* linux-target.c (debug_get_reg, debug_get_pc): New functions.
	Purely for debugging output.  Architecture dependent.

2001-04-09  Michael Snyder  <msnyder@redhat.com>

	* thread_db.c (thread_db_continue_thread): Continue the actual
	thread given, not necessarily the event thread.
	(thread_db_singlestep_thread): Step the actual thread given, 
	not necessarily the event thread.

2001-04-09  Michael Snyder  <msnyder@redhat.com>

	* thread-db.c (stop_all_threads): Do not send SIGSTOP to a thread
	if it has already been sigstopped.
	(thread_db_continue_thread): New function.  Continue a single thread.
	(thread_db_singlestep_thread): New function.  Step a single thread.
	(thread_db_attach): Set up continue_thread, singlestep_thread methods.
	
2001-04-09  Michael Snyder  <msnyder@redhat.com>

	* linux-target.c (PC_REGNUM): New enum, define.
	(decr_pc_after_break): New function.  Architecture dependent.
	This version will probably serve for all targets for which
	DECR_PC_AFTER_BREAK is one.  Those for which it is zero will
	want to define a no-op version of this function.
	* thread-db.c (first_thread_in_list): New function.
	(update_thread_list, stop_all_threads, wait_all_threads, 
	continue_all_threads): Use first_thread_in_list in for loops.
	(wait_all_threads): Handle SIGINT and SIGTRAP specially.
	Throw away SIGINT for all threads but the event thread.
	For SIGTRAP in other than the event thread, call decr_pc_after_break
	(giving the thread a chance to hit the trap again later).
	(thread_db_continue_program, thread_db_singlestep_program):
	Continue the event thread before all the others.

2001-04-05  Michael Snyder  <msnyder@redhat.com>

	* thread-db.c (add_pending_signal, send_pending_signals):
	New functions.  Allow wait_all_threads to collect any signals
	other than SIGSTOP from the threads and defer them.
	(wait_all_threads): Loop on each thread and call waitpid until
	we get SIGSTOP.  Any other signals are pended by throwing them
	into a list, and then sending them back to the threads using kill.
	(thread_db_get_thread_reg): Remove temporary hack for libthread_db
	bug.  (thread_db_set_thread_reg): Ditto.

2001-04-04  Michael Snyder  <msnyder@redhat.com>

	* server.h (struct child_process): Add a 'running' flag.
	* thread_db.c (continue_all_threads): Take gdbserv as argument.
	Use it to find the current thread, and don't continue that one
	(leave it up to the parent method to continue the event thread.)
	(thread_db_continue_program): Child is running -- set a flag.
	(thread_db_singlestep_program): Ditto.
	(thread_db_check_child_state): Return immediately unles the child
	is running.  Because this is a polling routine, we don't want to
	return any new events unles the child is officially running.
	Call waitpid with -1 instead of the process->pid, so that we
	can get events from the threads.  Alternately use __WCLONE.
	(thread_db_get_thread_reg): If thread is not specified, use
	the event thread (if possible).  Temporarily hack around a
	bug in the thread_db library.
	(thread_db_set_thread_reg): Ditto.
	
2001-04-04  Michael Snyder  <msnyder@redhat.com>

	* thread-db.c (continue_all_threads): Zero the attached, stopped,
	and waited flags only if thread is successfully continued.
	* linux-target.c: Fix broken endif directive.
	* configure.in: Test for sys/procfs.h.
	* config.in: Define HAVE_SYS_PROCFS_H.
	* configure: Regenerate.
	* thread-db.c (thread_list_lookup_by_pid): New function.
	(thread_db_check_child_state): Cache the event thread.
	(thread_db_fromtarget_thread_break): New function.  Call
	gdbserv_fromtarget_thread_break with the event thread.
	(thread_db_attach): Take over the fromtarget_break vector.
	* server.h (struct child_process): Add event_thread field.

2001-04-02  Michael Snyder  <msnyder@redhat.com>

	* thread-db.c: include errno.h for error reporting.
	(struct gdbserv_thread): Add flag 'waited'.
	(thread_db_type_str): New function for thread_extra_info.
	(find_new_threads_callback): Use errno for error reporting.
	(thread_db_thread_info): New function, for thread_extra_info.
	(wait_all_threads): New function.  Call waitpid on all threads
	that have been attached or sigstopped.  Incomplete -- needs to
	push back any signals other than SIGSTOP.
	(continue_all_threads): Send PTRACE_CONT only to threads that
	have been attached or sigstopped.
	(check_child_state): Call wait_all_threads.
	(thread_db_attach): Activate thread_info vector.

2001-03-30  Michael Snyder  <msnyder@redhat.com>

	* linux-target.c (linux_read_reg, linux_write_reg): New functions.
	Abstract out the code to actually read a register value, so that 
	it can be shared by several methods.
	(get_gregset): Use sizeof (GREGSET_T).
	(generic_linux_gg_reg_nr): New function.  Support new reg methods.
	(generic_linux_next_gg_reg): Ditto.
	(generic_linux_sizeof_reg): Ditto.
	(generic_linux_reg_format): Ditto.
	(generic_linux_get_reg): New function.  Newer register method,
	non-thread-aware version.
	(linux_attach): Use new register method in target vector.
	* thread-db.c: Remove some developmental ifdef code.
	(thread_db_get_thread_reg): Fall back on parentvec.get_reg
	if no thread or no thread_agent available.
	(thread_db_attach): Replace get_reg vector with get_thread_reg.

	* ptrace-target.c (ptrace_write_user): For X86 target, skip
	write-protected location in user/context address space.
	* linux-target.c (linux_process_get_reg): Use linux_read_reg.
	(linux_process_set_reg): Use linux_write_reg.
	(put_gregset): New function.  Write child's gregset.
	(generic_linux_get_reg): Use SIZEOF_MAPPEDREG.
	(generic_linux_set_reg): New function.  Newer register method.
	(linux_attach): Add set_reg to target vector, not process_set_reg.
	* thread-db.c (ps_lsetregs): Implement by calling put_gregset.
	(thread_db_set_thread_reg): New function.  Implement set_thread_reg.
	(thread_db_attach): Add set_thread_reg to target vector.

2001-03-29  Michael Snyder  <msnyder@redhat.com>

	* ptrace-target.c (ptrace_read_user, ptrace_write_user):
	Accept an explicit pid instead of a struct gdbserv.
	* linux-target.c: Include gdb_proc_service.h for gregset_t
	(FIXME: better place to get it from?)
	(linux_register_offset): Return signed long to facilitate 
	test for -1 error return value.
	(ppc_linux_xfer_reg, linux_process_get_reg, linux_process_set_reg):
	Calls to ptrace_read_user and ptrace_write_user now need a pid
	argument instead of a struct gdbserv.
	(reg_from_gregset): New function.
	(reg_to_gregset): New function.
	(get_gregset): New function.  Read child's gregset.
	* thread-db.c (ps_lgetregs): Implement by calling get_gregset.
	(thread_db_dlopen, thread_db_open, thread_db_attach): Change 
	sense of return: -1 now means failure, 0 means success.
	(thread_db_get_thread_reg): Call reg_from_gregset.

2001-03-29  Michael Snyder  <msnyder@redhat.com>

	* thread-db.c: Include signal.h, sys/ptrace.h (FIXME ptrace).
	(struct symbol_cache): Make value (address) unsigned.
	(add_symbol_to_list, lookup_cached_symbol): Ditto.
	(struct gdbserv_thread): Add attached, stopped flags to thread.
	(add_thread_to_list): Return pointer to new thread in list.
	(delete_thread_from_list): New function.
	(ps_pglobal_lookup, ps_pdread, ps_pdwrite, ps_ptread, ps_ptwrite):
	Muffle debugging output.
	(find_new_threads_callback): Muffle debugging output.
	Add thread to list only if it isn't already there.
	Use ptrace to attach to new threads.  (FIXME explicit ptrace).
	(update_thread_list): New function.  Only place where td_ta_thr_iter
	is called.  Builds up the thread list, prunes it of any dead threads.
	(thread_db_thread_next): Call update_thread_list.
	(get_thread_signals): Read the values of the cancel and restart
	signals from the target using hardcoded symbol names.
	(stop_all_threads): New function.  First cut.  Deliver SIGSTOP
	to all threads except the event thread and any new threads that
	have just been attached.
	(continue_all_threads): New function.  First cut.  Deliver
	PTRACE_CONT to all threads except the main thread.  Needs work.
	(thread_db_continue_program): New function.  
	(thread_db_singlestep_program): New function.
	(thread_db_get_thread_reg): New function, incomplete.
	(thread_db_attach): Take over continue_program, singlestep_program.
	Muffle some debugging output.

2001-03-26  Michael Snyder  <msnyder@redhat.com>

	* thread-db.c: New file.  Linux thread debugging layer.
	* linux-target.c (linux_attach): Call thread_db_attach.
	* ptrace-target.c: Export ptrace_handle_waitstatus for
	thread-db.c (FIXME).
	* configure.in: Add thread-db.c to linux target modules.
	(GREGSET_T, FPREGSET_T, HAVE_LWPID_T, HAVE_PSADDR_T,
	HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T, LINUX_TARGET): Define.
	* config.in (GREGSET_T, FPREGSET_T, HAVE_LWPID_T, 
	HAVE_PSADDR_T, HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T, LINUX_TARGET): 
	Default undefine.
	* configure: Regenerate.
	* Makefile.am (INCLUDES): Add $(srcdir)/../../include
	(devo/include), so that header files can be shared with gdb.
	(server_LDFLAGS): Add -ldl -rdynamic (FIXME configure).
	* Makefile.in: Regenerate.

2001-03-22  Andrew Cagney  <ac131313@redhat.com>

	* server.c (main): Pass gdbserver.attach and process to
	gdbserver_startup instead of gdbserver_poll.

2001-03-16  Michael Snyder  <msnyder@redhat.com>

	* linux-target.c (linux_detach): Pass new parameter to ptrace_detach.
	Fix file header comment typo.  Update copyright.

2001-03-16  Elena Zannoni  <ezannoni@cygnus.com>

        * dummy-target.c (dummy_detach): Add new parameter.
        * linux-target.c (linux_detach): Ditto.
        * ptrace-target.c (ptrace_detach): Ditto.
        * solaris-target.c (solaris_detach): Ditto.

2001-03-14  Andrew Cagney  <ac131313@redhat.com>

	* ChangeLog: Move to here from ../native.
	* Makefile.am: Ditto.
	* aclocal.m4: Ditto.
	* configure.in: Ditto.
	* dummy-target.c: Ditto.
	* linux-target.c: Ditto.
	* ptrace-target.c: Ditto.
	* ptrace-target.h: Ditto.
	* server.c: Ditto.
	* server.h: Ditto.
	* solaris-target.c: Ditto.
	* Makefile.in: Regenerate.
	* config.in: Ditto.
	* configure: Ditto.

2001-03-14  Andrew Cagney  <ac131313@redhat.com>

	* Makefile.am (INCLUDES): Update. Headers moved to ../include.
	* Makefile.in: Regenerate.

2000-11-27  Michael Snyder  <msnyder@happy.cygnus.com>

	* ptrace-target.c (ptrace_xfer_mem): Return -1 on error.

2000-11-21  Michael Snyder  <msnyder@cleaver.cygnus.com>

	* ptrace-target.c (noop_flush_i_cache): Comment out superfluous
	debugging output.
	* linux-target.c (linux_process_get_reg): Return value of 
	linux_register_offset is unsigned (can't be less than zero).
	(linux_process_rcmd): Just use '1' and '0' to control debug output.

2000-11-06  Michael Snyder  <msnyder@cleaver.cygnus.com>

	* dummy-target.c (dummy_attach): Fix order of memset args.
	* linux-target.c (linux_attach): Ditto.
	* ptrace-target.c (ptrace_attach): Ditto.
	* solaris-target.c (solaris_attach): Ditto.

2000-10-19  Belinda Brazelle <brazelle@redhat.com>

	* linux-target.c: Add support for Arm processor.

2000-10-12  Michael Snyder  <msnyder@cleaver.cygnus.com>

	* ptrace-target.c (ptrace_handle_waitstatus): Save exitstatus
	in process->stop_signal.

2000-09-14  Michael Snyder  <msnyder@michael.wirespeed.com>

	* linux-target.c: Define regmap etc. for SH target.
	* configure.in: Add defines for SH target.
	* configure: Rebuild.

2000-09-13  Michael Snyder  <msnyder@michael.wirespeed.com>

	* server.h (fromtarget_terminate): New field.  Also fix up 
	some overlooked function prototypes in the existing fields.
	(struct client_process): Rename to struct child_process.
	* linux-target.c (linux_fromtarget_terminate): New function.
	Called from main when child terminates abnormally.
	(linux_process_rcmd): New function.  Catches "qRcmd" requests, 
	which are currently used just to turn on debug output.
	* ptrace-target.c (ptrace_handle_waitstatus): Set stop_signal
	for the WIFSTOPPED case.  (ptrace_process_signal): Return zero
	instead of the signal number, to let libremote know that we have
	handled the signal.  (ptrace_xfer_memory): Fix off-by-one error.
	* solaris-target.c (solaris_fromtarget_terminate): New function.
	* server.c (main): Call fromtarget_terminate for the 'T' case.
	Do not request a one-second delay from gdbsocket_poll.

2000-09-08  Michael Snyder  <msnyder@cleaver.cygnus.com>

	* solaris-target.c: New file.  Just a prototype, doesn't actually
	work.  Used to confirm configurability to multiple targets.
	* dummy-target.c: New file.  Dummy back-end for implementing new
	targets such as solaris-target.c (above), before actually having
	a working back-end.  The dummy target works just like the sample
	target in the samples directory.
	* configure.in: Add AC_SUBST(TARGET_MODULES) to add the 
	appropriate target modules to the Makefile.  Add solaris target.
	* configure: Regenerate.
	* Makefile.am: Move *-target.c into EXTRA_server_SOURCES.
	Add TARGET_MODULES to server_LDADD.  Define server_DEPENDENCIES.
	* Makefile.in: Regenerate.
	* ptrace-target.h: New file.  Defines needed only by ptrace.
	* server.h: Remove ptrace-specific defines to ptrace-target.h.
	(struct server_vector): New, for target entry points.
	(struct nativeserver): Rename to struct client_process.
	* server.c: Use client_process for entry points, and server_vector.
	* linux-target.c: Include ptrace-target.h.  
	(ppc_linux_get_reg): Rename to ppc_linux_process_get_reg.
	(ppc_linux_set_reg): Rename to ppc_linux_process_set_reg.
	(ppc_linux_get_regs): Rename to ppc_linux_process_get_regs.
	(ppc_linux_set_regs): Rename to ppc_linux_process_set_regs.
	(linux_get_reg): Rename to linux_process_get_reg.
	(linux_set_reg): Rename to linux_process_set_reg.
	(linux_get_regs): Rename to linux_process_get_regs.
	(linux_set_regs): Rename to linux_process_set_regs.
	(gdbserver_check_child_state): Rename to linux_check_child_state.
	(gdbserver_fromtarget_break): Rename to linux_fromtarget_break.
	(gdbserver_fromtarget_exit): Rename to linux_fromtarget_exit.
	(struct server_vector gdbserver): New, defines entry points.
	* ptrace-target.c: Include ptrace-target.h.
	* aclocal.m4: New file.

2000-09-08  Michael Snyder  <msnyder@cleaver.cygnus.com>

	* linux-target.c (linux_get_reg, linux_set_reg): Remove direct
	calls to ptrace; instead use service call into ptrace-target.c.
	(linux_get_regs, linux_set_regs): Remove ifdef PPC; instead use
	an ifdef in linux_attach to set up the target vector pointers.
	(linux_attach): If PPC_LINUX_TARGET, use PPC versions of register
	functions instead of generic ones.  Define process_set_reg, so
	that the "P" command is now handled.

2000-09-07  Michael Snyder  <msnyder@cleaver.cygnus.com>

	* ptrace-target.c (ptrace_read_user, ptrace_write_user): New 
	functions.  Exported so that linux-target does not have to 
	call ptrace directly.  (ptrace_get_gregs, ptrace_set_gregs, 
	ptrace_get_fpregs, ptrace_set_fpregs): New functions.
	Exported for use by targets that use these methods.
	(ptrace_xfer_mem): Use ptrace_arg3_type instead of long.
	Add address to error messages.  
	* linux-target.c: Start using config macros, port to alpha and ppc.
	(ppc_linux_xfer_reg, ppc_linux_getset_reg, ppc_linux_get_reg,
	ppc_linux_set_reg, ppc_linux_get_regs, ppc_linux_set_regs):
	New functions.  Explicit knowledge of ppc linux register layout.
	(linux_get_reg): Catch undefined regmap offsets.
	(linux_set_reg): Ditto.
	(linux_get_regs): Conditionally call ppc_linux_get_regs.
	(linux_set_regs): Ditto.
	* configure.in: Add PPC target, and export target defines.
	* configure: Regenerate.
	* config.in: Add new target defines.

2000-09-06  Michael Snyder  <msnyder@cleaver.cygnus.com>

	* Makefile.am: Define CC and CFLAGS.
	* Makefile.in: Regenerate.
	* configure.in: New file.  Detect all manner of things.
	* config.in: New file.  Input file for config.h.
	* configure: Generate.
	* ptrace-target.c (ptrace_xfer_type): Move def'n into server.h.
	(PTRACE_XFER_SIZE): Ditto.
	* linux-target.c (ptrace_xfer_type): Move def'n into server.h.
	(ptrace_arg3_type): Ditto.
	* server.h: Use config macros to determine definitions of 
	ptrace_xfer_type, ptrace_arg1_type, ptrace_arg2_type, 
	ptrace_arg3_type, ptrace_arg4_type.

2000-09-05  Michael Snyder  <msnyder@cleaver.cygnus.com>

	* server.c (main): Detect exit status, and call fromtarget_exit
	instead of fromtarget_break.
	* linux-target.c (gdbserver_fromtarget_exit): New function.
	* ptrace-target.c (ptrace_kill_program, ptrace_sigkill_program):
	New functions.  Send signals to the child.
	(ptrace_exit_program): New function.

2000-09-05  Michael Snyder  <msnyder@cleaver.cygnus.com>

	* linux-target.c (linux_attach): Activate process_signal vector.
	(gdbserver_check_child_state): Send real received signal, instead
	of faking SIGTRAP.
	* ptrace-target.c (ptrace_break_program): New function.  Implement
	control-c interrupt from host.
	(ptrace_process_signal): Implement continuation signal.
	(ptrace_singlestep_program): Ditto.
	(ptrace_continue_program): Ditto.
	(ptrace_get_trap_number): New function.  Return signal to libremote.
	(ptrace_compute_signal): Ditto.
	(ptrace_attach): Activate break_program, process_signal, compute_signal
	and get_trap_number vectors.
	server.h (struct nativeserver): add signal_to_send field.
	Rename stop_sig to stop_signal.

2000-09-05  Michael Snyder  <msnyder@cleaver.cygnus.com>

	* ptrace-target.c (ptrace_singlestep_program): Make ptrace args long.
	FIXME: needs to be configurable.
	* linux-target.c (linux_get_reg, linux_set_reg): Make regaddr and
	regval configurable types.  FIXME needs real configury.

2000-09-01  Michael Snyder  <msnyder@cleaver.cygnus.com>
	New directory "native" for native gdbserver in libremote.
	* server.c: New file.  Entry point and main event loop.
	* server.h: New file.  Shared declarations.
	* linux-target.c: New file.  Linux version of libremote native stub.
	* ptrace-target.c: New file.  Ptrace operations for libremote stub.
	* Makefile.am: New file.  Automake source.
	* Makefile.in: New file.  Automake-generated makefile source.
	Note: this work is incomplete and only partially working.