Bug 26855

Summary: pascal: array of strings not printed correctly
Product: gdb Reporter: Tom de Vries <vries>
Component: pascalAssignee: Not yet assigned to anyone <unassigned>
Status: NEW ---    
Severity: normal CC: ssbssa
Priority: P2    
Version: HEAD   
Target Milestone: ---   
Host: Target:
Build: Last reconfirmed:

Description Tom de Vries 2020-11-09 16:09:11 UTC
Consider the patch here ( https://src.fedoraproject.org/rpms/gdb/blob/master/f/gdb-archer-vla-tests.patch ).  It contains a test-case gdb.pascal/arrays.exp.

When running the test-case, we run into:
...
(gdb) print StatArrStr^M
$9 = {#152#17'ú÷', 'ÿ'#127#0, #24#18'ú÷', 'ÿ'#127#0, #152#18'ú÷', 'ÿ'#127#0, #24#19'ú÷', 'ÿ'#127#0, #152#19'ú÷', 'ÿ'#127#0, #24#20'ú÷', 'ÿ'#127#0, #152#20'ú÷'}^M
(gdb) FAIL: gdb.pascal/arrays.exp: Print static array of string
...

Expected is:
...
(gdb) print StatArrStr^M
$9 = {'str0', 'str1', 'str2', 'str3', 'str4', 'str5', 'str6', 'str7', 'str8', 'str9', 'str10', 'str11', 'str12'}" 
...
Comment 1 Hannes Domani 2024-07-17 18:07:22 UTC
(In reply to Tom de Vries from comment #0)
> Consider the patch here (
> https://src.fedoraproject.org/rpms/gdb/blob/master/f/gdb-archer-vla-tests.
> patch ).  It contains a test-case gdb.pascal/arrays.exp.

That link is now dead, I think the file can now be found here:
https://src.fedoraproject.org/fork/joostv/rpms/gdb//blob/rawhide/f/gdb-archer-vla-tests.patch