-
Notifications
You must be signed in to change notification settings - Fork 9
/
ChangeLog
1293 lines (1067 loc) · 49.8 KB
/
ChangeLog
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
2019-05-28 Jeremy Bennett <[email protected]>
* targets/ri5cy/Ri5cyImpl.cpp (Ri5cyImpl::stepInstr)
(Ri5cyImpl::runToBreak): If we hit a breakpoint set the PC back to
the address of the previous instruction, to match the behavior of
upstream GDB.
2018-04-04 Andrew Burgess <[email protected]>
* server/GdbServerImpl.cpp (GdbServerImpl::rspSyscallRequest):
Don't store a continuation state for exit syscall.
2018-04-04 Andrew Burgess <[email protected]>
* server/GdbServerImpl.cpp (GdbServerImpl::GdbServerImpl):
Initialise mSyscallContinuation.
(GdbServerImpl::rspServer): Reset mSyscallContinuation after each
new connection.
(GdbServerImpl::rspSyscallRequest): Take parameter, update
mSyscallContinuation.
(GdbServerImpl::rspSyscallReply): Hangle mSyscallContinuation,
don't return a bool.
(GdbServerImpl::rspContinue): Pass parameter to rspSyscallRequest.
(GdbServerImpl::rspSingleStep): Call rspSyscallRequest to handle
syscalls.
(GdbServerImpl::rspClientRequest): Return after processing syscall
reply.
* server/GdbServerImpl.h (GdbServerImpl::lastPacketType): Delete.
(GdbServerImpl::SyscallContinuationType): New enum type.
(GdbServerImpl::mSyscallContinuation): New member variable.
(GdbServerImpl::rspSyscallRequest): Update parameter list.
(GdbServerImpl::rspSyscallReply): Update return type.
2018-04-01 Andrew Burgess <[email protected]>
* targets/gdbsim/GdbSimImpl.cpp (GdbSimImpl::doOneStep): Use ECALL
for syscalls, and correctly spot C.EBREAK or EBREAK for breakpoints.
(GdbSimImpl::stoppedAtSyscall): Delete definition.
* targets/gdbsim/GdbSimImpl.h (GdbSimImpl::stoppedAtSyscall):
Delete declaration.
2018-04-01 Andrew Burgess <[email protected]>
* server/GdbServerImpl.cpp (GdbServerImpl::rspReadReg): Return an
error when accessing an invalid register.
2018-03-22 Andrew Burgess <[email protected]>
* targets/gdbsim/GdbSimImpl.cpp (GdbSimImpl::doOneStep): Detect
compressed break instructions as well as uncompressed.
2018-03-15 Andrew Burgess <[email protected]>
* targets/gdbsim/GdbSimImpl.cpp (GdbSimImpl::GdbSimImpl):
Initialise new member variables. Call reset to do work.
(GdbSimImpl::reset): Close previous simulator, and open a new
simulator.
(GdbSimImpl::readRegister): Update error message to put register
number in hex.
(GdbSimImpl::doOneStep): Better support for different reasons the
simulator might stop.
* targets/gdbsim/GdbSimImpl.h (GdbSimImpl::mHaveReset): Declare
new member variable.
2017-12-21 Andrew Burgess <[email protected]>
* server/SyscallReplyPacket.h: New file.
* server/GdbServerImpl.cpp: Add cassert, and SyscallReplyPacket.h
include.
(GdbServerImpl::rspSyscallReply): Rewrite using
SyscallReplyPacket.
(GdbServerImpl::rspClientRequest): Use return value from
rspSyscallReply.
* server/GdbServerImpl.h (GdbServerImpl::rspSyscallReply): Change
return type.
* server/Makefile.am (ALL_SOURCES): Add SyscallReplyPacket.h.
* server/Makefile.in: Regenerated.
2017-12-05 Andrew Burgess <[email protected]>
* server/StreamConnection.cpp
(StreamConnection::StreamConnection): Initialise mIsConnected.
(StreamConnection::rspClose): Update header comment, set
mIsConnected.
(StreamConnection::isConnected): Return mIsConnected.
(StreamConnection::getRspCharRaw): Return -1 when zero bytes are
read, this should only happen when stdin is closed.
* server/StreamConnection.h (StreamConnection::mIsConnected):
Declare new member variable.
2017-11-20 Andrew Burgess <[email protected]>
* configure.ac: Add check for -faligned-new, and add to CXXFLAGS.
* m4/cxx_flags_check.m4: New file.
* Makefile.in: Regenerate.
* aclocal.m4: Regenerate.
* configure: Regenerate.
* server/Makefile.in: Regenerate.
* targets/Makefile.in: Regenerate.
* targets/common/Makefile.in: Regenerate.
* targets/gdbsim/Makefile.in: Regenerate.
* targets/pegasus/Makefile.in: Regenerate.
* targets/ri5cy/Makefile.in: Regenerate.
* trace/Makefile.in: Regenerate.
2018-02-26 Andrew Burgess <[email protected]>
* server/GdbServerImpl.cpp (GdbServerImpl::rspClientRequest):
Rephrase comment so GCC's fall-through warning doesn't trigger.
2018-02-26 Andrew Burgess <[email protected]>
* Makefile.in: Regenerate.
* aclocal.m4: Regenerate.
* config.h.in: Regenerate.
* configure: Regenerate.
* configure.ac: Allow all the targets to be optional. Add build
flags to support this.
* server/Makefile.am: Don't depend on any particular target being
present.
* server/Makefile.in: Regenerate.
* server/main.cpp: Only pull in target headers if the target is
configured for this build.
(createCpu): Only support instantiating targets configured for
this build.
* targets/Makefile.am: Don't depend on any particular target being
present.
* targets/Makefile.in: Regenerate.
* targets/common/Makefile.in: Regenerate.
* targets/gdbsim/Makefile.in: Regenerate.
* targets/picorv32/Makefile.in: Regenerate.
* targets/ri5cy/Makefile.in: Regenerate.
* trace/Makefile.in: Regenerate.
2017-10-22 Andrew Burgess <[email protected]>
* configure.ac: Turn -Wextra on by default.
* configure: Regenerate.
2017-10-22 Andrew Burgess <[email protected]>
* server/Utils.cpp (Utils::hex2Char): Remove 'const' qualifier
from return type.
* server/Utils.h (Utils::hex2Char): Likewise.
2017-10-22 Andrew Burgess <[email protected]>
* server/Utils.cpp (Utils::hex2RegVal): Use shift and bitwise or.
(Utils::hex2Val): Likewise.
2017-10-22 Andrew Burgess <[email protected]>
* server/GdbServerImpl.cpp (GdbServerImpl::interruptTimeout):
Initialise.
(GdbServerImpl::rspContinue): Remove interruptTimeout.
* server/GdbServerImpl.h (GdbServerImpl::interruptTimeout):
Declare.
2017-10-22 Andrew Burgess <[email protected]>
* server/GdbServerImpl.cpp (GdbServerImpl::GdbServerImpl): Update
member variable name.
(GdbServerImpl::rspContinue): Likewise.
(GdbServerImpl::rspCommand): Likewise.
* server/GdbServerImpl.h (GdbServerImpl::timeout): Renamed to...
(GdbServerImpl::mTimeout): ...this.
2017-10-22 Andrew Burgess <[email protected]>
* server/GdbServerImpl.cpp (GdbServerImpl::rspContinue): New definition.
(GdbServerImpl::rspSingleStep): New definition.
(GdbServerImpl::rspClientRequest): Move continue and step logic
into separate functions.
* server/GdbServerImpl.h (GdbServerImpl::rspContinue): New declaration.
(GdbServerImpl::rspSingleStep): New declaration.
2017-09-21 Andrew Burgess <[email protected]>
* server/GdbServerImpl.cpp (GdbServerImpl::rspSyscallRequest): Fix
up usage of new PRIxREG.
* targets/common/RegisterSizes.h (PRIuREG): Changed to...
(PRIxREG): ...this.
2017-10-20 Andrew Burgess <[email protected]>
* configure.ac: Make -with-wall the default, turning on -Wall.
* configure: Regenerate.
2017-10-20 Andrew Burgess <[email protected]>
* targets/common/RegisterSizes.h (PRIuREG): Define base on whether
we're doing 32 or 64 bit build.
* server/GdbServerImpl.cpp (GdbServerImpl::rspSyscallRequest):
Make use of PRIuREG format specifier.
2017-10-20 Andrew Burgess <[email protected]>
* server/GdbServerImpl.cpp (GdbServerImpl::rspSyscallReply): Don't
compare unsigned variable with signed immediate.
2017-10-20 Andrew Burgess <[email protected]>
* server/RspPacket.cpp (RspPacket::packStr): Change type of some
locals.
(RspPacket::packHexstr): Likewise.
(RspPacket::packRcmdStr): Likewise.
* server/RspPacket.h (bufSize): Change type.
(len): Likewise.
* server/GdbServerImpl.cpp (GdbServerImpl::rspWriteAllRegs):
Change type of some locals.
(GdbServerImpl::rspWriteReg): Likewise.
(GdbServerImpl::rspWriteMemBin): Likewise, also update sscanf
format to match.
(GdbServerImpl::rspWriteMemBin): Change type of some locals.
(GdbServerImpl::rspRemoveMatchpoint): Likewise.
(GdbServerImpl::rspInsertMatchpoint): Likewise.
2017-10-20 Andrew Burgess <[email protected]>
* server/main.cpp (main): Remove 'flags' and 'silent', unused
variables.
* server/GdbServerImpl.cpp (GdbServerImpl::rspClientRequest):
Remove 'timeout_start', unused variable.
2017-10-20 Andrew Burgess <[email protected]>
* configure.ac: Add new options to enable or disable Wall, Wextra,
and Werror compiler flags.
* configure: Regenerate.
2017-10-19 Andrew Burgess <[email protected]>
* configure.ac: Provide a default value for the top module name of
the ri5cy model.
* configure: Regenerate.
2017-09-26 Andrew Burgess <[email protected]>
* Makefile.in: Regenerate.
* configure: Regenerate.
* configure.ac: Add support for new --with-gdbsim-modeldir
configure option. Add gdbsim target makefile to list of makefiles
to generate.
* server/Makefile.am: Add suport for linking gdbsim in.
* server/Makefile.in: Regenerate.
* server/main.cpp: Support for creating gdbsim targets.
* targets/Makefile.am: Add support for building gdbsim target.
* targets/Makefile.in: Regenerate.
* targets/common/Makefile.in: Regenerate.
* targets/gdbsim/GdbSim.cpp: New file.
* targets/gdbsim/GdbSim.h:New file.
* targets/gdbsim/GdbSimImpl.cpp: New file.
* targets/gdbsim/GdbSimImpl.h: New file.
* targets/gdbsim/Makefile.am: New file.
* targets/gdbsim/Makefile.in: New file.
* targets/ri5cy/Makefile.in: Regenerate.
* trace/Makefile.in: Regenerate.
2017-09-21 Andrew Burgess <[email protected]>
* server/GdbServerImpl.cpp (GdbServerImpl::rspClientRequest):
Handle new ITarget::ResumeRes::STEPPED.
* targets/ITarget.cpp (operator<<): Handle printing for new
ITarget::ResumeRes::STEPPED.
* targets/ITarget.h (ITarget::ResumeRes): Add STEPPED.
* targets/ri5cy/Ri5cyImpl.cpp (Ri5cyImpl::stepInstr): Return
ITarget::ResumeRes::STEPPED when appropriate.
2017-09-22 Andrew Burgess <[email protected]>
* targets/ri5cy/Ri5cy.h: Fix comment.
2017-09-22 Andrew Burgess <[email protected]>
* server/main.cpp (main): Use new local variable instead of global
optind where possible.
2017-09-21 Andrew Burgess <[email protected]>
* server/main.cpp (usage): Mention 'version' new options, move
gdbserver_name into file scope.
(gdbserver_name): New file scope variable.
(show_version): New function.
(main): Check for and handle new 'version' options.
2017-09-21 Andrew Burgess <[email protected]>
* targets/ri5cy/Ri5cyImpl.h (Ri5cyImpl::stoppedAtSyscall): Declare
new member function.
* targets/ri5cy/Ri5cyImpl.cpp (Ri5cyImpl::stoppedAtSyscall):
Define new member function.
(Ri5cyImpl::stepInstr): Use new member function.
(Ri5cyImpl::runToBreak): Likewise.
2017-09-21 Andrew Burgess <[email protected]>
* server/GdbServerImpl.cpp (GdbServerImpl::rspClientRequest): No
longer pass SyscallInfo parameter.
* targets/ITarget.cpp: Update header comment.
* targets/ITarget.h (ITarget::resume): Remove SyscallInfo
parameter from both versions of this method.
* targets/common/Makefile.am: Remove references to deleted files.
* targets/common/Makefile.in: Regenerate.
* targets/common/SyscallInfo.cpp: Deleted.
* targets/common/SyscallInfo.h: Deleted.
* targets/ri5cy/Ri5cy.cpp (Ri5cy::resume): Remove SyscallInfo
parameter from both versions of this function.
* targets/ri5cy/Ri5cy.h (Ri5cy::resume): Remove SyscallInfo
parameter from both versions of this function.
* targets/ri5cy/Ri5cyImpl.cpp (Ri5cyImpl::resume): Remove
SyscallInfo parameter from both versions of this function.
(Ri5cyImpl::stepInstr): Likewise.
(Ri5cyImpl::runToBreak): Likewise.
* targets/ri5cy/Ri5cyImpl.h (Ri5cyImpl::resume): Remove
SyscallInfo parameter from both versions of this function.
(Ri5cyImpl::stepInstr): Likewise.
(Ri5cyImpl::runToBreak): Likewise.
* targets/picorv32/Picorv32.cpp (Picorv32::resume): Remove
SyscallInfo parameter.
* targets/picorv32/Picorv32.h (Picorv32::resume): Remove
SyscallInfo parameter.
2017-09-21 Andrew Burgess <[email protected]>
* server/main.cpp (createCpu): New function.
(main): Move creation of cpu object into new function.
2017-09-21 Andrew Burgess <[email protected]>
* server/main.cpp (cpu): Renamed to...
(globalCpu): ...this, and initialise to nullptr.
(main): Update references to 'cpu' to 'globalCpu'.
(sc_time_stamp): Likewise.
2017-09-21 Andrew Burgess <[email protected]>
* targets/ITarget.h (ITarget::ITarget): Make TraceFlags const.
* targets/ri5cy/Ri5cy.cpp (Ri5cy::Ri5cy): Likewise.
* targets/ri5cy/Ri5cy.h (Ri5cy::Ri5cy): Likewise.
* targets/ri5cy/Ri5cyImpl.cpp (Ri5cyImpl::Ri5cyImpl): Likewise.
* targets/ri5cy/Ri5cyImpl.h (Ri5cyImpl::Ri5cyImpl): Likewise.
2017-09-13 Andrew Burgess <[email protected]>
* config.h.in: Regenerate.
* configure: Regenerate.
* configure.ac: Add --with-xlen configure switch.
* server/Disassembler.cpp: Add config.h include.
(Disassembler::Disassembler): Set correct mach depending on if
we're building 32 or 64 bit.
* server/main.cpp: Add config.h include.
(usage): Select correct program name based on whether we're
building 32 or 64 bit.
* server/GdbServerImpl.cpp (GdbServerImpl::rspSyscallRequest):
Change to use register type.
(GdbServerImpl::rspReadAllRegs): Likewise.
(GdbServerImpl::rspWriteAllRegs): Likewise.
(GdbServerImpl::rspReadReg): Likewise.
(GdbServerImpl::rspWriteReg): Likewise.
* server/GdbServerImpl.h: Add RegisterSizes.h include.
(GdbServerImpl::RISCV_NUM_REG_BYTES): Depend on register size.
* server/Makefile.am: Make program name switchable at configure
time.
* server/Makefile.in: Regenerate.
* targets/ITarget.h: Add RegisterSizes.h include.
(ITarget::readRegister): Update parameter types to use register
size types.
(ITarget::writeRegister): Likewise.
* targets/common/RegisterSizes.h: New file.
* targets/ri5cy/Ri5cy.cpp (Ri5cy::readRegister): Update parameter
types to use register size types.
(Ri5cy::::writeRegister): Likewise.
* targets/ri5cy/Ri5cy.h (Ri5cy::readRegister): Update parameter
types to use register size types.
(Ri5cy::::writeRegister): Likewise.
* targets/ri5cy/Ri5cyImpl.cpp (Ri5cyImpl::readRegister): Update to
use register size types.
(Ri5cyImpl::writeRegister): Likewise.
(Ri5cyImpl::readDebugReg): Likewise.
(Ri5cyImpl::writeDebugReg): Likewise.
(Ri5cyImpl::runToBreak): Likewise.
* targets/ri5cy/Ri5cyImpl.h (Ri5cyImpl::readRegister): Update
parameters to use register size types.
(Ri5cyImpl::writeRegister): Likewise.
(Ri5cyImpl::readDebugReg): Likewise.
(Ri5cyImpl::writeDebugReg): Likewise.
(Ri5cyImpl::DBG_PPC): Define using register size.
2017-09-12 Andrew Burgess <[email protected]>
* Makefile.in: Regenerate with official automake 1.15 rather than
a patched version.
2017-09-01 Andrew Burgess <[email protected]>
* targets/ri5cy/Ri5cyImpl.h (Ri5cyImpl::DBG_PPC): Adjust for
64-bit register width.
2017-08-29 Jeremy Bennett <[email protected]>
* server/Makefile.am: Rename final target to riscv64-gdbserver.
* server/Makefile.in: Regenerated.
* server/main.cpp: Use riscv64-gdbserver in usage message.
2017-08-29 Andrew Burgess <[email protected]>
* server/GdbServerImpl.cpp (GdbServerImpl::rspSyscallRequest):
Support for exit syscall.
2017-08-29 Jeremy Bennett <[email protected]>
* server/Makefile.am: Rename final target to riscv32-gdbserver.
* server/Makefile.in: Regenerated.
* server/main.cpp: Use riscv32-gdbserver in usage message.
2018-01-26 Andrew Burgess <[email protected]>
* Makefile.in: Regenerate.
* configure: Regenerate.
* configure.ac: Remove '--with-binutils-libdir'.
* server/Disassembler.cpp: Delete.
* server/Disassembler.h: Delete.
* server/GdbServerImpl.cpp (GdbServerImpl::GdbServerImpl): Remove
use of mDisassembler.
(GdbServerImpl::~GdbServerImpl): Likewise.
(GdbServerImpl::command): Remove 'disas' command.
* server/GdbServerImpl.h: Don't include disassembler header file.
(GdbServerImpl::mDisassembler): Delete.
* server/Makefile.am (riscv_gdbserver_SOURCES): Remove
disassembler source files.
(riscv_gdbserver_LDADD): Remove libopcodes, and libbfd from the
link.
* server/Makefile.in: Regenerate.
* server/main.cpp (usage): Remove reference to disas trace flag.
* targets/ri5cy/Ri5cyImpl.cpp (Ri5cyImpl::clockModel): Remove
disassembler trace.
* targets/Makefile.in: Regenerated.
* targets/common/Makefile.in: Regenerated.
* targets/picorv32/Makefile.in: Regenerated.
* targets/ri5cy/Makefile.in: Regenerated.
* trace/TraceFlags.cpp (TraceFlags::TraceFlags): Remove disas flag.
(TraceFlags::traceDisas): Delete.
* trace/TraceFlags.h (TraceFlags::traceDisas): Delete declaration.
* trace/Makefile.in: Regenerated.
2017-08-28 Jeremy Bennett <[email protected]>
* README.md: Bring build instructions up to date for latest code
developments.
2017-08-28 Jeremy Bennett <[email protected]>
* README.md: Do not suggested SSH connection for model by default.
2017-08-15 Andrew Burgess <[email protected]>
* server/GdbServerImpl.cpp (GdbServerImpl::GdbServerImpl):
Initialise rsp member using initialisation list, not within
method body.
(GdbServerImpl::~GdbServerImpl): Don't delete rsp member.
2017-08-10 Jeremy Bennett <[email protected]>
Break out trace as a library in its own right to be shared by
targets and GdbServer. Make targets aware of their associated
server and provide an interface for them to access server
functionality. Use this to move disassembly to be generic.
* Makefile.am: Break out trace into its own library.
* Makefile.in: Regenerated.
* configure: Regenerated.
* configure.ac: Create Makefile for trace.
* server/AbstractConnection.h: Use standards compliant header
guard.
* server/Disassembler.cpp: Moved from targets/ri5cy.
(Disassembler::Disassembler): Use sprintf as the output function
and replace C-style casts.
(Disassembler::~Disassembler): Moved here from header.
(Disassembler::disassemble): Remove C style casts
* server/Disassembler.h: Moved from targets/ri5cy, use standards
compliant header guard.
(class Disassembler): Move to consistent camel case variable
naming and allow disassemble to return via a stream.
* server/GdbServer.cpp: Created after moving old version to
GdbServerImpl.cpp.
* server/GdbServer.h Created after moving old version to
GdbServerImpl.h.
* server/GdbServerImpl.cpp: Moved from GdbServer.cpp, class
renamed throughout and constants moved into class in header file.
(GdbServerImpl::GdbServerImpl): Create disassembler
(GdbServerImpl::~GdbServerImpl): Delete disassembler
(GdbServerImpl::command): Created.
* server/GdbServerImpl.h: Moved from GdbServer.h and class renamed
throughout.
(class GdbServerImpl): Constants moved into class, new member
function, command, added.
* server/Makefile.am: Add Disassembler.h and Disassember.cpp and
add binutils include directory to CPPFLAGS.
* server/Makefile.in: Regenerated.
* server/MpHash.h: Use standards compliant header guard.
* server/RspConnection.h: Likewise.
* server/RspPacket.h: Likewise.
* server/StreamConnection.h: Likewise.
* server/TraceFlags.cpp: Moved to trace directory.
* server/TraceFlags.h: Moved to trace directory.
* server/main.cpp (main): Use new ITarget interface for
constructor, passing in flag structure, rather than just the VCD
flag, pass gdbServer to target after instantiation.
* targets/ITarget.h (class ITarget): Add gdbServer method.
* targets/Makefile.am: Add server and trace include directories.
* targets/Makefile.in: Regenerated.
* targets/common/SyscallInfo.h: Use standards compliant header
guard.
* targets/picorv32/Makefile.am: Add server and trace include
directories and break out CPPFLAGS from CXXFLAGS
* targets/picorv32/Makefile.in: Regenerated.
* targets/picorv32/Picorv32.cpp (Picorv32::Picorv32): Take all
flags as argument.
(Picorv32::reset): Pass flags to new instantiation.
(Picorv32::gdbServer): Created.
* targets/picorv32/Picorv32.h: Use standards compliant header
guard.
(class Picorv32): Change prototype of constructor, add gdbserver
method, remove mWantVcd and replace with mFlags.
* targets/picorv32/Picorv32Impl.cpp: Take flags as argument to
constructor and use to initialize mWantVcd.
* targets/picorv32/Picorv32Impl.h: Use standards compliant header
guard, add GdbServer.h and TraceFlags.h headers.
(class Picorv32Impl): Change prototype of constructor.
* targets/ri5cy/Disassembler.cpp: Moved to server directory.
* targets/ri5cy/Disassembler.h: Likewise.
* targets/ri5cy/Makefile.am: Remove Disassembler.cpp and
Disassemler.h, break out CPPFLAGS from CXXFLAGS and remove
binutils include directory.
* targets/ri5cy/Makefile.in: Regenerated.
* targets/ri5cy/Ri5cy.cpp: Include GdbServer.h and TraceFlags.h
(Ri5cy::Ri5cy): Use new prototype of constructor and for calling
Ri5cyImpl constructor.
(Ri5cy::gdbServer): Created.
* targets/ri5cy/Ri5cy.h: Use standards compliant header guard.
(class Ri5cy): Change prototype of constructor, add gdbServer
method.
* targets/ri5cy/Ri5cyImpl.cpp: Remove include of Disassembler.h
and add GdbServer.h and TraceFlags.h, include sstream and add
using for std:cout and std::ostringstream.
(Ri5cyImpl::Ri5cyImpl): Change prototype, initialize mFlags and
mServer members, remove initialization of mWantVcd, do not
initialize disasembler.
(Ri5cyImpl::~Ri5cyImpl): Do not delete diassembler.
(Ri5cyImpl::gdbServer): Created.
(Ri5cyImpl::clockModel): Use mFlags->traceVcd () instead of
mWantVcd, call out to mServer to do diassembly.
* targets/ri5cy/Ri5cyImpl.h: Use standards compliant header guard.
(class Ri5cyImpl): Change prototype of constructor, add gdbsrever
method, add members mFlags and mServer and remove mWantVcd.
* trace/Makefile.am: Created.
* trace/Makefile.in: Generated.
* trace/TraceFlags.cpp: Moved from server directory.
* trace/TraceFlags.h: Moved from server directory and use
standards compliant header guard.
-2017-08-10 Jeremy Bennett <[email protected]>
Use symbolic names for trace flags.
* server/GdbServer.cpp (GdbServer::rspSetCommand): Remove
"remote-debug", make "debug" take 2 args, flag name and value.
(GdbServer::rspShowCommand): Remove "remote-debug2, allow "debug"
to take a second arg to specify particular flags.
* server/Makefile.am: Remove trailing whitespace.
* server/Makefile.in: Regenerated.
* server/TraceFlags.cpp (TraceFlags::iterator::iterator)
(TraceFlags::iterator::operator++ TraceFlags::iterator::operator==)
(TraceFlags::iterator::operator!= TraceFlags::iterator::operator*):
Created.
(TraceFlags::TraceFlags): Remove argument, initialize flags to zero.
(TraceFlags::traceRsp TraceFlags::traceConn TraceFlags::traceBreak)
(TraceFlags::traceVcd TraceFlags::traceSilent): Rename flags to
mFlags.
(TraceFlags::traceDisas TraceFlags::isFlag TraceFlags::flag)
(TraceFlags::begin TraceFlags::end TraceFlags::flagLookup): Created.
* server/TraceFlags.h (class TraceFlags): Add iterator nested
class, remove setSilent, allFlags, add traceDisas, isFlag, flag,
add flagInfo struct, rename flags as mFlags, add flagLookup helper.
* server/main.cpp (usage): Add new trace info.
(main): Use new flag argument handling.
2017-08-09 Andrew Burgess <[email protected]>
* server/GdbServer.cpp (GdbServer::GdbServer): Add new parameter,
initialise member variable.
(GdbServer::rspClientRequest): Modify handling of kill packet.
* server/GdbServer.h (GdbServer::KillBehaviour): New enum.
(GdbServer::GdbServer): Add new parameter.
(GdbServer::killBehaviour): New member variable.
* server/main.cpp (main): Pass suitable GdbServer::KillBehaviour
value to new GdbServer object.
2017-08-09 Andrew Burgess <[email protected]>
* server/main.cpp (main): Delete connection.
2017-08-07 Jeremy Bennett <[email protected]>
Fix the automake files for using disassembly. The issue was that
binutils dis-asm.h did not have print_insn_riscv marked as for
external use. Once that is resolved these changes allow the
server to build.
* Makefile.in: Regenerated.
* configure: Regenerated.
* configure.ac: Cleanly define BINUTILS_INCDIR and BINUTILS_LIBDIR
* server/Makefile.am: No need for libibert in LDADD
* server/Makefile.in: Regenerated.
* targets/Makefile.in: Regenerated.
* targets/common/Makefile.in: Regenerated.
* targets/ri5cy/Disassembler.cpp: Add license header, use C++
style C includes.
* targets/ri5cy/Disassembler.h (class Disassembler): Add license
header, use C++ style C includes
* targets/ri5cy/Makefile.am: Simplify includes dir for binutils
utils.
* targets/ri5cy/Makefile.in: Regenerated.
2017-08-07 Ian Bolton <[email protected]>
* configure.ac: Some new configure parameters.
* server/Makefile.am: Bring in required binutils libraries.
* targets/ri5cy/Disassembler.cpp: New file.
* targets/ri5cy/Disassembler.h: New file.
* targets/ri5cy/Makefile.am: Compile new files.
* targets/ri5cy/Ri5cyImpl.cpp: Call into Disassembler.
* targets/ri5cy/Ri5cyImpl.h: New Disassembler member.
2017-08-04 Andrew Burgess <[email protected]>
* server/AbstractConnection.cpp: New file.
* server/AbstractConnection.h: New file.
* server/GdbServer.cpp (GdbServer::GdbServer): Takes connection
object instead of port number.
* server/GdbServer.h (GdbServer::GdbServer): Takes connection
object instead of port number.
(GdbServer::rsp): Is now an AbstractConnection.
* server/Makefile.am (riscv_gdbserver_SOURCES): Add new files.
* server/Makefile.in: Regenerate.
* server/RspConnection.cpp (RspConnection::RspConnection): Update
initialisation list.
(RspConnection::getPkt): Move to AbstractConnection.cpp.
(RspConnection::putPkt): Likewise.
(RspConnection::putRspChar): Likewise.
(RspConnection::getRspChar): Likewise.
(RspConnection::haveBreak): Likewise.
* server/RspConnection.h: Add include.
(class RspConnection): Add parent class.
(getPkt): Moved to AbstractConnection.h.
(putPkt): Likewise.
(haveBreak): Likewise.
(BREAK_CHAR): Likewise.
(traceFlags): Likewise.
(mHavePendingBreak): Likewise.
(mGetCharBuf): Likewise.
(mNumGetBufChars): Likewise.
(putRspChar): Likewise.
(getRspChar): Likewise.
(putRspCharRaw): Mark as virtual.
(getRspCharRaw): Likewise.
* server/StreamConnection.cpp: New file.
* server/StreamConnection.h: New file.
* server/main.cpp: New includes.
(usage): Add new options.
(main): Handle new --stdin/s option, create a connection object of
the correct type, and pass this to gdbserver.
2017-08-04 Andrew Burgess <[email protected]>
* server/main.cpp (main): Check for null coreName.
2017-07-12 Jeremy Bennett <[email protected]>
* server/GdbServer.cpp: Add stdexcept header.
2017-07-12 Jeremy Bennett <[email protected]>
* server/GdbServer.cpp (GdbServer::rspSetCommand): Make catch
friendlier to old compilers.
2017-07-12 Jeremy Bennett <[email protected]>
Prior to GCC 5.0 std::put_time is not supported.
* server/GdbServer.cpp: Remove using for std::put_time.
(GdbServer::rspCommand): Rewrite timestamp to not use put_time.
2017-07-10 Jeremy Bennett <[email protected]>
* server/RspConnection.cpp (RspConnection::RspConnection):
Initialize mHavePendingBreak.
* targets/ri5cy/Ri5cyImpl.cpp: Add using declaration for std::cerr
and std::endl.
2017-07-06 Jeremy Bennett <[email protected]>
* targets/picorv32/Picorv32.cpp (Picorv32::getCycleCount)
(Picorv32::getInstrCount): Call corresponding method in
mPicorv32Impl.
* targets/picorv32/Picorv32Impl.cpp (Picorv32Impl::Picorv32Impl):
Initialize mInstr.
(Picorv32Impl::getCycleCount, Picorv32Impl::getInstrCount):
Created.
* targets/picorv32/Picorv32Impl.h (class Picorv32Impl): Add
getCycleCount and getInstrCount.
2017-07-06 Jeremy Bennett <[email protected]>
* server/GdbServer.cpp: Include ctime, provide using for
std::localtime and std::put_time.
(GdbServer::rspClientRequest): Remove redundant std::chrono.
(GdbServer::rspCommand): Fix some alignment issues, add OK
responses for several commands, implement timestamp.
2017-07-05 Jeremy Bennett <[email protected]>
* server/GdbServer.cpp (GdbServer::rspCommand): Add missing
monitor commands.
(GdbServer::rspSetCommand): Created.
(GdbServer::rspShowCommand): Created.
* server/GdbServer.h (class GdbServer): Add rspSetCommand and
rspShowCommand methods.
* server/RspPacket.cpp (RspPacket::packRcmdStr): Created.
* server/RspPacket.h (class RspPacket): Add packRcmdStr method.
* server/TraceFlags.cpp (TraceFlags::traceRsp): Add setter.
(TraceFlags::allFlags): Created setter and getter.
* server/TraceFlags.h: Add traceRsp setter and allFlags setter and
getter methods.
* server/Utils.cpp (Utils::split): Created.
* server/Utils.h (class Utils): Added split method.
2017-07-04 Jeremy Bennett <[email protected]>
This is a GDB server to work with RI5CY with 128-bit wide
instruction FIFO. It also fixes a minor glitch with RSP.
* server/RspConnection.cpp (RspConnection::RspConnection):
Initialize mNumGetBufChars.
* targets/ri5cy/Ri5cyImpl.cpp (Ri5cyImpl::stepInstr)
(Ri5cyImpl::runToBreak): No need to flush the pipeline.
2017-07-04 Jeremy Bennett <[email protected]>
* server/GdbServer.cpp (GdbServer::rspCommand): Add "monitor
cyclecount".
* targets/ri5cy/Ri5cyImpl.h: Correct name of DBG_HIT_SSTH from
DBG_HIT_SSTE.
2017-07-04 Jeremy Bennett <[email protected]>
* targets/ri5cy/Ri5cyImpl.cpp (Ri5cyImpl::stepInstr): Write
DBG_CTRL after flushing pipeline.
(Ri5cyImpl::runToBreak): Compute value for DBG_CTRL before
flushing the pipeline, so can write DBG_CTRL in the next cycle.
2017-07-03 Jeremy Bennett <[email protected]>
* targets/ri5cy/Ri5cyImpl.cpp (Ri5cyImpl::runToBreak): Tried a
different sequence.
2017-07-03 Jeremy Bennett <[email protected]>
This implementation provides a way to resume continuously, but
does not yet work with the RI5CY implementation. It seems the
pipeline does not get fully flushed.
* server/GdbServer.cpp (GdbServer::rspRemoveMatchpoint)
(GdbServer::rspInsertMatchpoint): Just return empty packets, so
GDB does breakpoints by steam.
* targets/ri5cy/Ri5cyImpl.cpp (Ri5cyImpl::readRegister)
(Ri5cyImpl::writeRegister): Warn rather than abort if asked for
unkown registers, this is a GDB problem.
(Ri5cyImpl::stepInstr): Write NPC first to flush pipeline.
(Ri5cyImpl::runToBreak): Implementation provided, but does not yet
work.
2017-07-03 Jeremy Bennett <[email protected]>
* targets/picorv32/Picorv32Impl.cpp: Unify header inclusion.
* targets/ri5cy/Ri5cyImpl.cpp: Remove std::chrono:: namespace
qualifiers throughout, covered by using declarations.
(Ri5cyImpl::resetModel): Set the DBG_IE reg to trap on breakpoint
and illegal instruction.
(Ri5cyImpl::haltModel): Rewrite using waitForHalt.
(Ri5cyImpl::waitForHalt): Created.
(Ri5cyImpl::stepInstr): Rewritten to write the NPC to flush the
pipeline.
* targets/ri5cy/Ri5cyImpl.h (class Ri5cyImple): Add constants for
DBG_IE fields and waitForHalt method.
2017-07-08 Jeremy Bennett <[email protected]>
* targets/ri5cy/Ri5cyImpl.cpp (Ri5cyImpl::stepInstr): clear
fetch_enable_i.
2017-06-30 Jeremy Bennett <[email protected]>
* targets/ri5cy/Ri5cyImpl.cpp (Ri5cyImpl::resume): Deal with all
types of step.
(Ri5cyImpl::readRegister, Ri5cyImpl::writeRegister): Rewrite to
use debug register access methods.
(Ri5cyImpl::read, Ri5cyImpl::write): Access dp_ram, not sp_ram.
(Ri5cyImpl::clockModel): Created.
(Ri5cyImpl::resetModel, Ri5cyImpl::haltModel): Rewritten to use
debug register access methods.
(Ri5cyImpl::readDebugReg, Ri5cyImpl::writeDebugReg): Created.
(Ri5cyImpl::stepInstr): Written to use SSTE debug interface and
handle timeouts.
* targets/ri5cy/Ri5cyImpl.h (class Ri5cyImpl): Add new debug
flags, clockModel, readDebugReg, writeDebugReg, add timeout to
stepInstr.
2017-06-29 Jeremy Bennett <[email protected]>
* server/GdbServer.cpp (GdbServer::rspCommand): Modify the
horrible hack for exit - still a horrible hack though.
* server/main.cpp (main): Delete the cpu at the end.
* targets/ri5cy/Ri5cyImpl.cpp: Fix the headers for the new model.
(Ri5cyImpl::resume): Mark unused param. Needs to be written properly.
(Ri5cyImpl::read, Ri5cyImpl::write): Use single ported RAM.
(Ri5cyImpl::resetModel): Set fetch_enable to 0 on reset.
(Ri5cyImpl::stepInstr, Ri5cyImpl::runToBreak): Created.
* targets/ri5cy/Ri5cyImpl.h: Add stepInstr and runToBreak.
2017-06-27 Jeremy Bennett <[email protected]>
This commit syncrhonizes with all the work on the ri5cy_wip branch
as far as it makes sense.
* server/main.cpp (main): Tidy up a comment
* targets/ri5cy/Ri5cyImpl.cpp: Include iostream and more Verilator
model headers.
(Ri5cyImpl::resume): Remove unused attributes and add
implementation.
(Ri5cyImpl::readRegister): Turn do-while into while loop when
looking for rvalid.
(Ri5cyImpl::writeRegister): Add implementation.
(Ri5cyImpl::read, Ri5cyImpl::write): Add task based
implementation..
2017-06-27 Jeremy Bennett <[email protected]>
Add VCD generation as an option.
* server/GdbServer.cpp (GdbServer::rspCommand): Pass argument to
reset.
* server/Makefile.am: Add more target libraries.
* server/Makefile.in: Regenerated.
* server/TraceFlags.cpp (TraceFlags::traceVcd): Created.
* server/TraceFlags.h: Add traceVcd method and constant.
* server/main.cpp: Include Ri5cy.h, make cpu static global.
(main): Allow RI5CY target.
(sc_time_stamp): Created.
* targets/ITarget.h (class ITarget): Add constructor to take
boolean arg, correct void argument lists, add timeStamp.
* targets/picorv32/Picorv32.cpp (Picorv32::Picorv32): Pass in
argument to select VCD.
(Picorv32::timeStamp): Created.
* targets/picorv32/Picorv32.h (class Picorv32): Add constructor to take
boolean arg, correct void argument lists, add timeStamp.
* targets/picorv32/Picorv32Impl.cpp (Picorv32Impl::Picorv32Impl):
Initialize VCD.
(Picorv32Impl::~Picorv32Impl): Close VCD.
(Picorv32Impl::clockStep, Picorv32Impl::writeProgramAddr):
Generate VCD when stepping.
(Picorv32Impl::timeStamp): Created.
* targets/picorv32/Picorv32Impl.h (class Picorv32Impl): Pass flag
to constructor, add timeStamp method, add VCD member variables.
* targets/ri5cy/Makefile.am: Add C include dirs.
* targets/ri5cy/Makefile.in: Regenerated.
* targets/ri5cy/Ri5cy.cpp (Ri5cy::Ri5cy): Add constructor to take
boolean arg, correct void argument lists, add timeStamp.
(Ri5cy::timeStamp): Creatd.
* targets/ri5cy/Ri5cy.h (class Ri5cy): Pass arg to constructor,
add timeStamp.
* targets/ri5cy/Ri5cyImpl.cpp Include verilcated_vcd_c.h
(Ri5cyImpl::Ri5cyImpl): Take arg, initialize VCD.
(Ri5cyImpl::~Ri5cyImpl): Close VCD
(Ri5cyImpl::resume, Ri5cyImpl::terminate,Ri5cyImpl::reset):
Correct types.
(Ri5cyImpl::readRegister): Fix typo, generated VCD.
(Ri5cyImpl::writeRegister, Ri5cyImpl::read, Ri5cyImpl::write):
Mark regs unused, return result.
(Ri5cyImpl::insertMatchpoint, Ri5cyImpl::removeMatchpoint)
(Ri5cyImpl::command): Mark args unused.
(Ri5cyImpl::timeStamp): Created.
(Ri5cyImpl::resetModel, Ri5cyImpl::haltModel): Generate VCD.
* targets/ri5cy/Ri5cyImpl.h (class Ri5cyImpl): Correct types
throughout.
2017-06-27 Jeremy Bennett <[email protected]>
Remove compile time debug flag GDBSERVER_DEBUG.
* Makefile.in: Regenerate.
* server/GdbServer.cpp (GdbServer::rspRemoveMatchpoint)
(GdbServer::rspInsertMatchpoint): Report details of matchpoint
under control of trace flags.
* server/RspConnection.cpp (RspConnection::rspConnect)
(RspConnection::rspClose): Likewise.
* server/TraceFlags.cpp (TraceFlags::traceRsp): Make constant.
(TraceFlags::traceConn, TraceFlags::traceBreak)
(TraceFlags::traceSilent, TraceFlags::setSilent): Created.
* server/TraceFlags.h (class TraceFlags): Make read accessors
constant, add traceConn, traceBreak, traceSilent and setSilent.
* server/main.cpp (usage): Add help and silent flags.
(main): Extend command line flag for silent running.
2017-06-25 Jeremy Bennett <[email protected]>
This will not currently compile, but shows how the interface via
the debug unit should work.
* targets/ITarget.h (class ITarget): Add ResetType scoped
enumeration, allow different types of reset, do not pass
matchpoint addresses by reference.
* targets/picorv32/Makefile.am: Add headers to sources, so they
are included in the distribution.
* targets/picorv32/Makefile.in: Regenerated.
* targets/picorv32/Picorv32.cpp (Picorv32::reset): Provide
argument for reset type
(Picorv32::insertMatchpoint, Picorv32::removeMatchpoint): Pass
address by value, not reference.
* targets/picorv32/Picorv32.h (class Picorv32): Add argument to
reset and pass address by value to insertMatchpoint and
removeMatchpoint.
* targets/picorv32/Picorv32Impl.cpp: Clarify header comment.
* targets/picorv32/Picorv32Impl.h: Likewise.
* targets/ri5cy/Makefile.am: Update list of sources.
* targets/ri5cy/Makefile.in: Regenerated.
* targets/ri5cy/Ri5cy.cpp: Created.
* targets/ri5cy/Ri5cy.h: Created.
* targets/ri5cy/Ri5cyImpl.cpp: Created.
* targets/ri5cy/Ri5cyImpl.h: Created.
2017-06-25 Jeremy Bennett <[email protected]>
* configure.ac: Make model directories absolute.
* configure: Regenerated.
2017-06-25 Graham Markall <[email protected]>
* targets/picorv32/Picorv32.cpp: (RUN_SAMPLE_PERIOD) Add.
(resume) When step is CONTINUE, step for RUN_SAMPLE_PERIOD
instructions; if timeout expired, return TIMEOUT.
Otherwise, repeat. Default timeout if none supplied is
zero, resulting in single-stepping.
2017-06-24 Graham Markall <[email protected]>
Partially-working implementation of Picorv32
Reading and writing memory and registers works, as does
single-stepping instructions. Breakpoints are not presently
working.
* server/GdbServer.cpp: (RISCV_PC_REGNUM) Remove, as it seems a
bit specific to Picorv32 (it handles the PC differently to the
rest of the register file).
* targets/picorv32/Picorv32.cpp: (RISCV_PC_REGNUM) Add.
(resume) Implement, but only single-stepping - no mutiple steps
with timeouts. (terminate) Add comment. (reset)
Implement. (readRegister, writeRegister) Fix handling of PC, which
is a special case.
2017-06-24 Graham Markall <[email protected]>
* targets/picorv32/Picorv32.cpp: (readRegister, writeRegister)
(read, write) Implement.
2017-06-24 Graham Markall <[email protected]>
Although this builds, the Picorv32 implementation is not yet
functioning because the functions of Picorv32 are not yet
implemented. Mostly they will be able to call into the
Picorv32Impl class, but some of the functions will need a little
more work.
class should be very similar to the original Cpu class
implementation, and the Picorv32 class adapts it and implements
the ITarget interface.
Some of the choices made here are not completely future-proof;
when we add a second core (RI5CY) we may have problems with
linking.
* Makefile.in: Regenerate.
* server/Makefile.am: Link with Verilated Picorv32 libraries.
* server/Makefile.in: Regenerate.
* targets/picorv32/Makefile.am: Compile Picorv32.cpp and
Picorv32Impl.cpp. Include target, target/common, and verilated
Picorv32 folders. Don't warn on unused params.
* targets/picorv32/Makefile.in: Regenerate.
* targets/picorv32/Picorv32.cpp: Replace old Cpu implementation