Compare commits
710 Commits
Author | SHA1 | Date |
---|---|---|
|
ed8730b4d9 | |
|
d7b61266b7 | |
|
3ab415fc4a | |
|
6aff62077b | |
|
ab7962ace7 | |
|
3c0f61139e | |
|
578aa401ab | |
|
12a215835b | |
|
51337c28d9 | |
|
50ea6a9154 | |
|
f9a00bf2a5 | |
|
db493ec1a2 | |
|
b2003eae67 | |
|
28b99d9981 | |
|
a6ec4e0365 | |
|
c54196c27b | |
|
c3e0b255c8 | |
|
03ff51b230 | |
|
9e0dc4d5fc | |
|
76de449876 | |
|
cd3e3d1a80 | |
|
2a1cf3d881 | |
|
63fa2e2956 | |
|
c172b26911 | |
|
e67700bf46 | |
|
a5d2c85367 | |
|
f258b03b2f | |
|
99dc38b0d5 | |
|
2f578f51e4 | |
|
86fc1101ee | |
|
0a2f2a5526 | |
|
8ac06474ff | |
|
92508e7ce6 | |
|
9949e18054 | |
|
9c37e8a0b1 | |
|
ece6742a5f | |
|
f7760f831c | |
|
f3efb4b040 | |
|
c79314bd92 | |
|
292cb418af | |
|
2ff911f2f5 | |
|
b1c3400f7f | |
|
30a397d1b3 | |
|
cb6c609428 | |
|
f0a9ac3b0f | |
|
06f4849386 | |
|
a17be6a448 | |
|
865e2df5ec | |
|
654fb507d8 | |
|
0ec4d78c4e | |
|
d96e24456a | |
|
cc7695234a | |
|
1b0ecbf0a5 | |
|
e507809c35 | |
|
a5d0cd87e1 | |
|
e90857f9de | |
|
116197567a | |
|
252ce24e08 | |
|
d1a098601d | |
|
96770ac25f | |
|
29841d1068 | |
|
b1bf7bc649 | |
|
9404c96ac6 | |
|
e5955df97a | |
|
c60e39b61c | |
|
46d477eac9 | |
|
538775743e | |
|
0172100cc0 | |
|
31f5b96fb9 | |
|
2111580a73 | |
|
83f9b09ebf | |
|
1ea4563053 | |
|
9c7d730fb9 | |
|
f11faa1e6a | |
|
dba70321b8 | |
|
6ee43aeabb | |
|
4336687790 | |
|
e18aa17153 | |
|
d82716127f | |
|
a3b5cf46c2 | |
|
453d99770b | |
|
fc163ce193 | |
|
0702d0d3e8 | |
|
56040033ea | |
|
22998d94f7 | |
|
af8b999134 | |
|
b9ce1a2833 | |
|
f774761950 | |
|
657623c611 | |
|
c26726c3ff | |
|
76ddc56b6d | |
|
f21bb2353c | |
|
2ef085ccae | |
|
4f0bc6641e | |
|
47b02ba87c | |
|
2e649f71e0 | |
|
2f6fc56e9a | |
|
2cbda85f1c | |
|
17183a1d49 | |
|
d790689b70 | |
|
138f53b360 | |
|
5cc516897b | |
|
4f936c1cb8 | |
|
0ec66a7bfb | |
|
100fc38c45 | |
|
e95ed4b7b3 | |
|
9d054c36c2 | |
|
26734721d0 | |
|
af046d7244 | |
|
57c3c609d3 | |
|
bf87ff816c | |
|
ab024a6de1 | |
|
a0d6e14aa3 | |
|
fd7e5d77a8 | |
|
3638ec5fec | |
|
f3cfd8cd2d | |
|
4f2cb1818a | |
|
399e22022a | |
|
ea73a43ec5 | |
|
a902391148 | |
|
8014ace474 | |
|
732f37d3a4 | |
|
c9daf93497 | |
|
56d681a596 | |
|
9e41188f8d | |
|
2bcd68d7bf | |
|
b7dc57f2a9 | |
|
f62b682777 | |
|
9736ebfbb0 | |
|
397c8a5922 | |
|
fd48d313b8 | |
|
4262bf0e32 | |
|
35cdcb6a32 | |
|
ad1404c938 | |
|
4ec1a6344c | |
|
3b2269511e | |
|
828d4ecb65 | |
|
c287c646a5 | |
|
f9b3dfe2c9 | |
|
1919df08fd | |
|
82f299dd3b | |
|
4a848ebc38 | |
|
188c9fbf90 | |
|
57200186ba | |
|
6f7202ecff | |
|
3a396f9ecd | |
|
21011c1e9c | |
|
a749f1b208 | |
|
c42f0297dc | |
|
4632e1fa80 | |
|
a8767b37e5 | |
|
b7971c4818 | |
|
f637971ee3 | |
|
f524ac5870 | |
|
bb1c5356b1 | |
|
f408ba821f | |
|
d614670f9d | |
|
5210cb945e | |
|
1b69fa99d4 | |
|
364e8a5927 | |
|
f318b4ab7b | |
|
d4a557a0ab | |
|
4f1de05c3f | |
|
99b34dc784 | |
|
9eb42f22d5 | |
|
3bff4d98ba | |
|
2d3d9675a7 | |
|
d1308d3e8b | |
|
4d0140dca1 | |
|
c52da2003f | |
|
39868f2076 | |
|
80d902f397 | |
|
7e382f5dd2 | |
|
b5e2ceba4b | |
|
7c86337b97 | |
|
e6074aa8c0 | |
|
ee50e95c11 | |
|
5bb0f3bac3 | |
|
5e93e40f3c | |
|
5b3c4903f6 | |
|
dbc649db15 | |
|
0fffd6c99d | |
|
b1807ab4e1 | |
|
f9739f5031 | |
|
af2c2a5422 | |
|
26c3bd5ab5 | |
|
8d40388f0a | |
|
04e185f768 | |
|
f3b44f72fc | |
|
7a79f904cf | |
|
082583feeb | |
|
1d69420972 | |
|
7a45095ecc | |
|
194c0860de | |
|
21eae8e63e | |
|
35d56bae33 | |
|
718f2d69b3 | |
|
6022fd9542 | |
|
a06a12e15b | |
|
b6aa878929 | |
|
7fedccf706 | |
|
602e87ce15 | |
|
714c89f6bc | |
|
246098eea8 | |
|
9bafb7c0fd | |
|
5eb569c1b7 | |
|
b513153c46 | |
|
43d7d2a8eb | |
|
29d49d9491 | |
|
2b94f0063a | |
|
d08a20f70d | |
|
425d099f6b | |
|
1c3e2fa7ac | |
|
53edfc5dad | |
|
eed01b8fe7 | |
|
25e02352ec | |
|
4ca26b1f03 | |
|
2f00fc1fdb | |
|
303cd25eb9 | |
|
60c662d53a | |
|
235c57bc26 | |
|
d258670d64 | |
|
35cbc92246 | |
|
0414aeba5a | |
|
dc6b8f4f24 | |
|
0300a2eb2d | |
|
d987921748 | |
|
72aed9dc5e | |
|
8cff818ba3 | |
|
a5a9adcd40 | |
|
efdba24c8f | |
|
aacdec2a04 | |
|
92d45fce5d | |
|
b4d85c5451 | |
|
a4c8bcab20 | |
|
1d224e61d8 | |
|
9faadbe569 | |
|
3f32311b4a | |
|
5c5eb100c4 | |
|
2e29a3ec7b | |
|
1e35566c47 | |
|
7306e88eb4 | |
|
fb74e3a749 | |
|
8e7b06e27c | |
|
6b46b9b395 | |
|
8dde8d1082 | |
|
d6851d1cc9 | |
|
223268c6f0 | |
|
ae97bb9470 | |
|
7ecbbb2a16 | |
|
2e49bd4dad | |
|
dd7d988932 | |
|
bd0820fa32 | |
|
98045fb9ce | |
|
76251d6102 | |
|
c0cbb1aae4 | |
|
4dd46aad51 | |
|
04d3aefc17 | |
|
b84e3d603f | |
|
01264bee10 | |
|
fdbd5e346b | |
|
09aea42a99 | |
|
1ed22de73e | |
|
46311ecd89 | |
|
32b1677f0e | |
|
22d1e60a36 | |
|
c4c35c27fd | |
|
7759e5bf5e | |
|
92913c305e | |
|
2e597932c2 | |
|
4f2557176f | |
|
5a2431c246 | |
|
3a8cee8e79 | |
|
c16b44507f | |
|
6f06b1f20c | |
|
65adaa87b1 | |
|
eca6388b15 | |
|
5d173531c0 | |
|
ccd56ac8c9 | |
|
13d2cd5e8a | |
|
46cc044291 | |
|
a4961b9190 | |
|
046f33b589 | |
|
4800a9bd4b | |
|
2116e53327 | |
|
c296a6a29e | |
|
07b8587e82 | |
|
41e6c203a2 | |
|
23f398e61a | |
|
ebe9b7c7c7 | |
|
29ca342f5e | |
|
213eccacf2 | |
|
a2e5681941 | |
|
ac7f21685a | |
|
99387a5556 | |
|
e32f96fe44 | |
|
44ca5e4d1e | |
|
fe8a89ffd6 | |
|
276edb821d | |
|
a6321db170 | |
|
595c255949 | |
|
569c63c04c | |
|
1c8228902d | |
|
2f1c4cf200 | |
|
23a14272f3 | |
|
7fe027b002 | |
|
1dfcf42ec5 | |
|
886d770627 | |
|
c779d454ec | |
|
15c3af2823 | |
|
1309eacac1 | |
|
e18a36d366 | |
|
ddc0fde6fd | |
|
90127c91f8 | |
|
ae96b4a095 | |
|
d92234971d | |
|
cebf6f9af9 | |
|
80780792f9 | |
|
a688fb8c5a | |
|
32f92b2e34 | |
|
19dab0f219 | |
|
d03633a0c0 | |
|
6d1599f359 | |
|
c2620a4c45 | |
|
186e7e4733 | |
|
e209b86292 | |
|
6c08fa48ef | |
|
61676c0354 | |
|
7cbf529231 | |
|
21fb199a6f | |
|
5d84d7a16a | |
|
b6bc0d5376 | |
|
072837144c | |
|
2f7f533ae7 | |
|
1445be5574 | |
|
b132e8a8fd | |
|
a438e05d6f | |
|
a79edc166a | |
|
4fb72aaac3 | |
|
ae793cbabe | |
|
43b0bce1db | |
|
8095c33951 | |
|
862e0ed47f | |
|
3cf9dd58a7 | |
|
8a983520e3 | |
|
e3bcba8731 | |
|
58638f8971 | |
|
77c099e703 | |
|
3887bdb15a | |
|
448d46bddf | |
|
263b58000d | |
|
d3f8b94c47 | |
|
5175ae097f | |
|
0d2fda651f | |
|
533da91091 | |
|
191ccfbccd | |
|
902c8e5abc | |
|
c1c430cb5f | |
|
a972d47b4c | |
|
33d54d9950 | |
|
4f54fc4526 | |
|
cec9297712 | |
|
b73009e1d2 | |
|
2a0fd8ad84 | |
|
de9f421a3c | |
|
dd2c5ed0e6 | |
|
2b55d27fdb | |
|
11195233b5 | |
|
b3b50862b2 | |
|
eb6cb2db36 | |
|
730f2712ef | |
|
b472cbae9c | |
|
fbd3253d15 | |
|
7082135fc2 | |
|
4eee7557d1 | |
|
c70b5a54fd | |
|
7ae270c46d | |
|
68e26e6ce3 | |
|
9b1a6425a1 | |
|
1ecbbdb62a | |
|
6e0665a33c | |
|
936befa814 | |
|
0a42762f26 | |
|
699758c055 | |
|
7f2a1f7d83 | |
|
331a1f1adc | |
|
da639865c1 | |
|
fceb2c10d4 | |
|
3e564422d3 | |
|
3af2cc602d | |
|
e86a0cc13a | |
|
2c55a5441d | |
|
ff3b0d487c | |
|
1be7752b2c | |
|
0f5a62e3a0 | |
|
6ca3c187db | |
|
2d6d1b2f58 | |
|
1d5872dcff | |
|
fe74423b08 | |
|
25caf289cd | |
|
de8f297ee0 | |
|
39657054d5 | |
|
a717e23abf | |
|
bdf0f25112 | |
|
a97ee30c3d | |
|
5a0302a66d | |
|
2ed9630f59 | |
|
ad6c9a2ec1 | |
|
7ffdf589d4 | |
|
77f735272d | |
|
b6e7beb35c | |
|
872aab074e | |
|
2f9bb15290 | |
|
9be0c23ca4 | |
|
44de066dfd | |
|
752ff760ca | |
|
19d4458238 | |
|
a5cf0a66f1 | |
|
89fbbfccaf | |
|
6d620330a4 | |
|
5c14ffc194 | |
|
01f32662b6 | |
|
a3d12927af | |
|
3344b6ba48 | |
|
46f79e2112 | |
|
f8a4995541 | |
|
c3b2d52489 | |
|
d6a3040467 | |
|
05b22fe0aa | |
|
9dd2140456 | |
|
cf0b61abc0 | |
|
9b8aeef05e | |
|
ac3dde5b9b | |
|
402506cde5 | |
|
43e595b798 | |
|
b7ec76456e | |
|
f2d6b407bf | |
|
f1490f0b05 | |
|
1054fa6d0b | |
|
350d5a31c9 | |
|
dd75969f7b | |
|
ab333d9938 | |
|
99cd04126a | |
|
fd14833eee | |
|
f7d32d5142 | |
|
88bebb3fb1 | |
|
ebaa23aa6c | |
|
5677fb2373 | |
|
556378e101 | |
|
ab816baf60 | |
|
f92430a872 | |
|
5f3b63a0d4 | |
|
ed2617e547 | |
|
4bb744e410 | |
|
707343965f | |
|
e5ad958b76 | |
|
26b4790954 | |
|
54956de3d3 | |
|
92b52c5e6f | |
|
75aac11369 | |
|
979799fd0b | |
|
60a99dfbcf | |
|
a7d7affa1c | |
|
fb02fc3940 | |
|
29e1388476 | |
|
30f2069f6e | |
|
87ed9489e3 | |
|
4945b2263d | |
|
914739c6e2 | |
|
536bc96db1 | |
|
8aabf36e77 | |
|
642e08f465 | |
|
a4cfcd84af | |
|
e7f1c832a7 | |
|
5387893eab | |
|
c501c4bdb1 | |
|
11eae30806 | |
|
a9b4b48ee3 | |
|
31a43c2209 | |
|
a930df3ffb | |
|
2b568b7d72 | |
|
31e8955039 | |
|
c382081360 | |
|
500c813e17 | |
|
f8eee05550 | |
|
0c6cb6731e | |
|
3071876327 | |
|
d1151d6581 | |
|
43d8d62a03 | |
|
de3a592768 | |
|
72cb82c2bf | |
|
fdf21a3584 | |
|
bd04ff0041 | |
|
08451779f9 | |
|
f289ba9c21 | |
|
fbf39fd05f | |
|
78a785d4c5 | |
|
e26cb4d20f | |
|
ea0fcb4584 | |
|
572702753c | |
|
9d32f32f26 | |
|
3d3c8f2d4a | |
|
380b734913 | |
|
01b1870f18 | |
|
d8e4a58344 | |
|
c64e73263b | |
|
46d8530cd6 | |
|
9fd125663d | |
|
1c8cc3b9e6 | |
|
fb7506558d | |
|
e05ce76998 | |
|
9e9d7b2bbb | |
|
9ce5c44987 | |
|
55c3b84dd7 | |
|
3a4ee84176 | |
|
e81f470147 | |
|
67644b518c | |
|
5c4cedb759 | |
|
750e47124c | |
|
84ef6008bd | |
|
62c93b3435 | |
|
3000de323b | |
|
a50d5b63a7 | |
|
c5c713f196 | |
|
cc92f09aa1 | |
|
a5cb59e730 | |
|
ec26424839 | |
|
2d09ea90fb | |
|
7cb24ade9a | |
|
2f2930eb78 | |
|
e6cdbfd018 | |
|
191f4d2883 | |
|
254f0e90bc | |
|
4862a154d1 | |
|
e349329c80 | |
|
52bb570800 | |
|
7218d159e3 | |
|
7649e489fb | |
|
c6934442a9 | |
|
922e4a0796 | |
|
b9aa4c4c7b | |
|
ebad377b2d | |
|
9a9da3171c | |
|
eceaa13e09 | |
|
3b55f7833b | |
|
e6e9cf3987 | |
|
847a670287 | |
|
c8a4544144 | |
|
4adfc8b85c | |
|
7180591ac5 | |
|
f314eb3eb5 | |
|
09dd7775eb | |
|
1cd4f3809f | |
|
98c0c7adab | |
|
46a1caf62e | |
|
5752ad02c2 | |
|
48cf710500 | |
|
d5159132e2 | |
|
9aa6e1de63 | |
|
833b1257d3 | |
|
14982af20a | |
|
3080c0e54f | |
|
6b44006b8d | |
|
4d79cf2e34 | |
|
6f7687c33f | |
|
af2402c03d | |
|
9f971d482a | |
|
e266c66da6 | |
|
cb641a7fa4 | |
|
c00fd45a3e | |
|
16c47e7f0c | |
|
ea07d44ec2 | |
|
8973456f5a | |
|
f4677c421e | |
|
6b3e65b584 | |
|
b0e03f562d | |
|
a174f683ec | |
|
0bba59c99f | |
|
33ff7091ac | |
|
278e869a86 | |
|
0b11bd2616 | |
|
6fa2f55b27 | |
|
a56307ebf7 | |
|
b0a94c2ea0 | |
|
ef59bb9bcc | |
|
ac0fd38455 | |
|
41aeaf682d | |
|
4546826203 | |
|
1d7d503e7e | |
|
1d459d3886 | |
|
458c182c85 | |
|
8b8af94462 | |
|
336050181d | |
|
c804fb8a8f | |
|
58ea63ab49 | |
|
60add66ae4 | |
|
e00e5eae57 | |
|
1bcf9b6604 | |
|
5abe5add8a | |
|
924e99b419 | |
|
44969d3e6c | |
|
20f9f675af | |
|
4d3bc055ec | |
|
f13fc54bce | |
|
dd46ae6cd0 | |
|
1c901a1d76 | |
|
bc0aadfac7 | |
|
ee681d3b2f | |
|
c874340ae4 | |
|
3b3433b0b0 | |
|
aee5861550 | |
|
8b7a3e1875 | |
|
a04bc95fa3 | |
|
45f79714b9 | |
|
b469073e48 | |
|
7abf5f4318 | |
|
755bb6f90b | |
|
9291de59d7 | |
|
e9671f2471 | |
|
c5a9fdc6a7 | |
|
39d52ac1d6 | |
|
5542e358c5 | |
|
79563d6f81 | |
|
a7d6efc17b | |
|
626a9059b8 | |
|
8c4c91efd9 | |
|
0911f375d9 | |
|
bef45217a0 | |
|
ab901d8ee8 | |
|
40f8d2fd9b | |
|
580e05685a | |
|
4d3aa56117 | |
|
a8e7ccc4fd | |
|
8ae3364a4f | |
|
e93d3474d8 | |
|
806f8c893c | |
|
2164cdaf2a | |
|
594e04b937 | |
|
8bf73e0a01 | |
|
ab83f240e4 | |
|
0435006f87 | |
|
6370c17fdf | |
|
f340c03820 | |
|
a97b573f83 | |
|
2280d5542d | |
|
833a63eb37 | |
|
99fa6c959f | |
|
912c39689b | |
|
273e7e98b2 | |
|
657c7f1700 | |
|
e5611bfae3 | |
|
6ca358b064 | |
|
620a59a5c4 | |
|
d73adb8cd5 | |
|
364647c376 | |
|
3b9bc6fe50 | |
|
a0312d1afc | |
|
b92be7d39b | |
|
6f1140096d | |
|
536aae5e6a | |
|
f51c5abf98 | |
|
bcdbb34cad | |
|
c030186760 | |
|
638b7b7c33 | |
|
859e1355cf | |
|
6fcb74ef6e | |
|
f4df2f361a | |
|
8876ac66af | |
|
b39dc5cfa9 | |
|
94cd124608 | |
|
dc95c8ce1c | |
|
360c47d6af | |
|
06e575d259 | |
|
373e1bc565 | |
|
5db4c14168 | |
|
8aaf99f932 | |
|
906a06fdb4 | |
|
88c9a17a81 | |
|
5b24c1447a | |
|
6110293bb9 | |
|
b5f2aa80ed | |
|
4fe9415174 | |
|
3ce5394498 | |
|
d5fb1cc724 | |
|
42988d9875 | |
|
5b5fe7db1b | |
|
5e5008a2ef | |
|
1a30f6fafe | |
|
984eecf70c | |
|
eb11e3c0e6 | |
|
09c22fd5fb | |
|
8dadf56185 | |
|
0d29c1b6dd | |
|
36474ab6e8 | |
|
159237942c | |
|
e241ec0a7b | |
|
a1707b2aa7 | |
|
81783d0ff2 | |
|
ec0fcb652c | |
|
c1c2c92c21 | |
|
f6cec01799 | |
|
d8167bba62 | |
|
be8869e59a | |
|
23cdd3f2da | |
|
407ebe9063 | |
|
39347a6c8a | |
|
9b2688b72a | |
|
3dc772c212 | |
|
84892dcf86 | |
|
917bed595e |
|
@ -1 +0,0 @@
|
||||||
gdb-6.8.tar.bz2
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
/binutils-gdb
|
||||||
|
/gdb-libstdc++-v3-python-8.1.1-20180626.tar.xz
|
||||||
|
/v2.0.2.tar.gz
|
||||||
|
/gdb-10.1.tar.xz
|
21
Makefile
21
Makefile
|
@ -1,21 +0,0 @@
|
||||||
# Makefile for source rpm: gdb
|
|
||||||
# $Id: Makefile,v 1.2 2007/05/30 14:38:39 kasal Exp $
|
|
||||||
NAME := gdb
|
|
||||||
SPECFILE = $(firstword $(wildcard *.spec))
|
|
||||||
|
|
||||||
define find-makefile-common
|
|
||||||
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
|
|
||||||
endef
|
|
||||||
|
|
||||||
MAKEFILE_COMMON := $(shell $(find-makefile-common))
|
|
||||||
|
|
||||||
ifeq ($(MAKEFILE_COMMON),)
|
|
||||||
# attempt a checkout
|
|
||||||
define checkout-makefile-common
|
|
||||||
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
|
|
||||||
endef
|
|
||||||
|
|
||||||
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
|
|
||||||
endif
|
|
||||||
|
|
||||||
include $(MAKEFILE_COMMON)
|
|
|
@ -0,0 +1,104 @@
|
||||||
|
# Fedora GDB local patches policy
|
||||||
|
|
||||||
|
In order to make things easier for the Fedora GDB maintainer, we
|
||||||
|
choose to auto-generate the local patches by making use of an upstream
|
||||||
|
git repository. Below you can find a few instructions on how to work
|
||||||
|
using this method.
|
||||||
|
|
||||||
|
You need to run the following commands from the directory that
|
||||||
|
contains the "gdb.spec" file.
|
||||||
|
|
||||||
|
## Importing the GDB patches into a git repository
|
||||||
|
|
||||||
|
1) The local patches (`*.patch`) need to be imported into an upstream
|
||||||
|
git repository. For example, let's assume you cloned the repository
|
||||||
|
by doing:
|
||||||
|
|
||||||
|
`$ git clone git://sourceware.org/git/binutils-gdb.git`
|
||||||
|
|
||||||
|
> TIP: if you already have the repository cloned somewhere in your
|
||||||
|
> system, you can pass a "--reference <dir>" to the "git clone"
|
||||||
|
> command and it will use your local repository as much as possible
|
||||||
|
> to make the clone, speeding up things.
|
||||||
|
|
||||||
|
2) After cloning the upstream repository, you can import your patches
|
||||||
|
by using the script "generate-git-repo-from-patches.sh":
|
||||||
|
|
||||||
|
`$ sh generate-git-repo-from-patches.sh <REPOSITORY_DIR>`
|
||||||
|
|
||||||
|
The script will basically cd into the repository, checkout the
|
||||||
|
revision specified in the file `_git_upstream_commit`, iterate through
|
||||||
|
the file `_patch_order` and "git-am" every patch *in that order*.
|
||||||
|
This operation should complete without errors; if you find a problem
|
||||||
|
with `git-am`, it probably means that the revision specified in the
|
||||||
|
file `_git_upstream_commit` is wrong.
|
||||||
|
|
||||||
|
## Rebasing the patches against a newer version/release
|
||||||
|
|
||||||
|
1) First, cd into the upstream repository. All you have to do is
|
||||||
|
choose the revision against which you plan to rebase the patches, and
|
||||||
|
`git rebase <REVISION>`. git will do the rest, and you will be able
|
||||||
|
to perform conflict resolution by git's algorithm, which is smarter.
|
||||||
|
|
||||||
|
## Creating new patches
|
||||||
|
|
||||||
|
1) Create the new patch on top of the the others, as usual. Note that
|
||||||
|
you can use `git rebase` whenever you want to reorder patch order, or
|
||||||
|
even to delete a patch.
|
||||||
|
|
||||||
|
2) When writing the commit log, you must obey a few rules. The
|
||||||
|
subject line *must* be the filename of the patch. This line will be
|
||||||
|
used when exporting the patches from the git repository, and
|
||||||
|
(obviously) it gives the filename that should be used for this
|
||||||
|
specific patch.
|
||||||
|
|
||||||
|
3) You can also add comments that will go into the auto-generated
|
||||||
|
`Patch:` file (see below). To do that, use the special marker `;;` at
|
||||||
|
the beginning of the line. This way, a commit log that says:
|
||||||
|
|
||||||
|
~~~~~~~~~~~
|
||||||
|
test-patch.patch
|
||||||
|
|
||||||
|
;; This is a test patch
|
||||||
|
;; Second line
|
||||||
|
~~~~~~~~~~~
|
||||||
|
|
||||||
|
Will generate the following entry in the auto-generated `Patch:` file:
|
||||||
|
|
||||||
|
~~~~~~~~~~~
|
||||||
|
# This is a test patch
|
||||||
|
# Second line
|
||||||
|
PatchXYZ: test-patch.patch
|
||||||
|
~~~~~~~~~~~
|
||||||
|
|
||||||
|
## Exporting the GDB patches from the git repository
|
||||||
|
|
||||||
|
1) When you're done working with the patches, go back to the directory
|
||||||
|
that contains the `gdb.spec` file, and from there you run:
|
||||||
|
|
||||||
|
`$ sh generate-patches-from-git-repo.sh <REPOSITORY_DIR>`
|
||||||
|
|
||||||
|
This will regenerate all of the `*.patch` files (excluding the ones that
|
||||||
|
were also excluded from the git repository), and also regenerate a few
|
||||||
|
control files. These control files are:
|
||||||
|
|
||||||
|
- `_gdb.spec.Patch.include`: This file contains the `Patch:` directives.
|
||||||
|
|
||||||
|
- `_gdb.spec.patch.include`: This file contains the `%patch` directives.
|
||||||
|
|
||||||
|
- `_patch_order`: This file contains the patches, in the exact order
|
||||||
|
that they must be applied. It is used when importing the patches
|
||||||
|
into the git repository.
|
||||||
|
|
||||||
|
- `_git_upstream_commit`: This file contains the last upstream commit
|
||||||
|
against which the patches were rebased. It is used when importing
|
||||||
|
the patches into the git repository.
|
||||||
|
|
||||||
|
NOTE: If you did a rebase against a newer upstream version, you need
|
||||||
|
to specify the commit/tag/branch against which you rebased:
|
||||||
|
|
||||||
|
`$ sh generate-patches-from-git-repo.sh <REPOSITORY_DIR> <COMMIT_OR_TAG_OR_BRANCH>`
|
||||||
|
|
||||||
|
For example, if you rebased against `gdb-8.1-release`:
|
||||||
|
|
||||||
|
`$ sh generate-patches-from-git-repo.sh <REPOSITORY_DIR> gdb-8.1-release`
|
|
@ -0,0 +1,384 @@
|
||||||
|
# Match the Fedora's version info.
|
||||||
|
#=fedora
|
||||||
|
Patch001: gdb-6.3-rh-testversion-20041202.patch
|
||||||
|
|
||||||
|
# VLA (Fortran dynamic arrays) from Intel + archer-jankratochvil-vla tests.
|
||||||
|
#=push
|
||||||
|
Patch002: gdb-vla-intel-fortran-strides.patch
|
||||||
|
|
||||||
|
#=push
|
||||||
|
Patch003: gdb-vla-intel-fortran-vla-strings.patch
|
||||||
|
|
||||||
|
#=push+jan
|
||||||
|
Patch004: gdb-vla-intel-stringbt-fix.patch
|
||||||
|
|
||||||
|
# Add a wrapper script to GDB that implements pstack using the
|
||||||
|
# --readnever option.
|
||||||
|
#=push
|
||||||
|
Patch005: gdb-6.3-gstack-20050411.patch
|
||||||
|
|
||||||
|
# VSYSCALL and PIE
|
||||||
|
#=fedoratest
|
||||||
|
Patch006: gdb-6.3-test-pie-20050107.patch
|
||||||
|
|
||||||
|
# Get selftest working with sep-debug-info
|
||||||
|
#=fedoratest
|
||||||
|
Patch007: gdb-6.3-test-self-20050110.patch
|
||||||
|
|
||||||
|
# Test support of multiple destructors just like multiple constructors
|
||||||
|
#=fedoratest
|
||||||
|
Patch008: gdb-6.3-test-dtorfix-20050121.patch
|
||||||
|
|
||||||
|
# Fix to support executable moving
|
||||||
|
#=fedoratest
|
||||||
|
Patch009: gdb-6.3-test-movedir-20050125.patch
|
||||||
|
|
||||||
|
# Test sibling threads to set threaded watchpoints for x86 and x86-64
|
||||||
|
#=fedoratest
|
||||||
|
Patch010: gdb-6.3-threaded-watchpoints2-20050225.patch
|
||||||
|
|
||||||
|
# Verify printing of inherited members test
|
||||||
|
#=fedoratest
|
||||||
|
Patch012: gdb-6.3-inheritancetest-20050726.patch
|
||||||
|
|
||||||
|
# Support TLS symbols (+`errno' suggestion if no pthread is found) (BZ 185337).
|
||||||
|
#=push+jan: It should be replaced by Infinity project.
|
||||||
|
Patch013: gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch
|
||||||
|
|
||||||
|
# Fix TLS symbols resolving for shared libraries with a relative pathname.
|
||||||
|
# The testsuite needs `gdb-6.5-tls-of-separate-debuginfo.patch'.
|
||||||
|
#=fedoratest: One should recheck if it is really fixed upstream.
|
||||||
|
Patch014: gdb-6.5-sharedlibrary-path.patch
|
||||||
|
|
||||||
|
# Improved testsuite results by the testsuite provided by the courtesy of BEA.
|
||||||
|
#=fedoratest: For upstream it should be rewritten as a dejagnu test, the test of no "??" was useful.
|
||||||
|
Patch015: gdb-6.5-BEA-testsuite.patch
|
||||||
|
|
||||||
|
# Testcase for deadlocking on last address space byte; for corrupted backtraces.
|
||||||
|
#=fedoratest
|
||||||
|
Patch016: gdb-6.5-last-address-space-byte-test.patch
|
||||||
|
|
||||||
|
# Fix readline segfault on excessively long hand-typed lines.
|
||||||
|
#=fedoratest
|
||||||
|
Patch017: gdb-6.5-readline-long-line-crash-test.patch
|
||||||
|
|
||||||
|
# Test sideeffects of skipping ppc .so libs trampolines (BZ 218379).
|
||||||
|
#=fedoratest
|
||||||
|
Patch018: gdb-6.5-bz218379-ppc-solib-trampoline-test.patch
|
||||||
|
|
||||||
|
# Fix lockup on trampoline vs. its function lookup; unreproducible (BZ 218379).
|
||||||
|
#=fedora
|
||||||
|
Patch019: gdb-6.5-bz218379-solib-trampoline-lookup-lock-fix.patch
|
||||||
|
|
||||||
|
# Find symbols properly at their original (included) file (BZ 109921).
|
||||||
|
#=fedoratest
|
||||||
|
Patch020: gdb-6.5-bz109921-DW_AT_decl_file-test.patch
|
||||||
|
|
||||||
|
# Update PPC unwinding patches to their upstream variants (BZ 140532).
|
||||||
|
#=fedoratest
|
||||||
|
Patch021: gdb-6.3-bz140532-ppc-unwinding-test.patch
|
||||||
|
|
||||||
|
# Testcase for exec() from threaded program (BZ 202689).
|
||||||
|
#=fedoratest
|
||||||
|
Patch022: gdb-6.3-bz202689-exec-from-pthread-test.patch
|
||||||
|
|
||||||
|
# Testcase for PPC Power6/DFP instructions disassembly (BZ 230000).
|
||||||
|
#=fedoratest
|
||||||
|
Patch023: gdb-6.6-bz230000-power6-disassembly-test.patch
|
||||||
|
|
||||||
|
# Allow running `/usr/bin/gcore' with provided but inaccessible tty (BZ 229517).
|
||||||
|
#=fedoratest
|
||||||
|
Patch024: gdb-6.6-bz229517-gcore-without-terminal.patch
|
||||||
|
|
||||||
|
# Avoid too long timeouts on failing cases of "annota1.exp annota3.exp".
|
||||||
|
#=fedoratest
|
||||||
|
Patch025: gdb-6.6-testsuite-timeouts.patch
|
||||||
|
|
||||||
|
# Support for stepping over PPC atomic instruction sequences (BZ 237572).
|
||||||
|
#=fedoratest
|
||||||
|
Patch026: gdb-6.6-bz237572-ppc-atomic-sequence-test.patch
|
||||||
|
|
||||||
|
# Test leftover zombie process (BZ 243845).
|
||||||
|
#=fedoratest
|
||||||
|
Patch028: gdb-6.5-bz243845-stale-testing-zombie-test.patch
|
||||||
|
|
||||||
|
# New locating of the matching binaries from the pure core file (build-id).
|
||||||
|
#=push+jan
|
||||||
|
Patch029: gdb-6.6-buildid-locate.patch
|
||||||
|
|
||||||
|
# Fix loading of core files without build-ids but with build-ids in executables.
|
||||||
|
# Load strictly build-id-checked core files only if no executable is specified
|
||||||
|
# (Jan Kratochvil, RH BZ 1339862).
|
||||||
|
#=push+jan
|
||||||
|
Patch030: gdb-6.6-buildid-locate-solib-missing-ids.patch
|
||||||
|
|
||||||
|
#=push+jan
|
||||||
|
Patch031: gdb-6.6-buildid-locate-rpm.patch
|
||||||
|
|
||||||
|
# Fix displaying of numeric char arrays as strings (BZ 224128).
|
||||||
|
#=fedoratest: But it is failing anyway, one should check the behavior more.
|
||||||
|
Patch032: gdb-6.7-charsign-test.patch
|
||||||
|
|
||||||
|
# Test PPC hiding of call-volatile parameter register.
|
||||||
|
#=fedoratest
|
||||||
|
Patch033: gdb-6.7-ppc-clobbered-registers-O2-test.patch
|
||||||
|
|
||||||
|
# Testsuite fixes for more stable/comparable results.
|
||||||
|
#=fedoratest
|
||||||
|
Patch034: gdb-6.7-testsuite-stable-results.patch
|
||||||
|
|
||||||
|
# Test ia64 memory leaks of the code using libunwind.
|
||||||
|
#=fedoratest
|
||||||
|
Patch035: gdb-6.5-ia64-libunwind-leak-test.patch
|
||||||
|
|
||||||
|
# Test hiding unexpected breakpoints on intentional step commands.
|
||||||
|
#=fedoratest
|
||||||
|
Patch036: gdb-6.5-missed-trap-on-step-test.patch
|
||||||
|
|
||||||
|
# Test GCORE for shmid 0 shared memory mappings.
|
||||||
|
#=fedoratest: But it is broken anyway, sometimes the case being tested is not reproducible.
|
||||||
|
Patch038: gdb-6.3-mapping-zero-inode-test.patch
|
||||||
|
|
||||||
|
# Test a crash on `focus cmd', `focus prev' commands.
|
||||||
|
#=fedoratest
|
||||||
|
Patch039: gdb-6.3-focus-cmd-prev-test.patch
|
||||||
|
|
||||||
|
# Test various forms of threads tracking across exec() (BZ 442765).
|
||||||
|
#=fedoratest
|
||||||
|
Patch040: gdb-6.8-bz442765-threaded-exec-test.patch
|
||||||
|
|
||||||
|
# Test a crash on libraries missing the .text section.
|
||||||
|
#=fedoratest
|
||||||
|
Patch041: gdb-6.5-section-num-fixup-test.patch
|
||||||
|
|
||||||
|
# Fix resolving of variables at locations lists in prelinked libs (BZ 466901).
|
||||||
|
#=fedoratest
|
||||||
|
Patch042: gdb-6.8-bz466901-backtrace-full-prelinked.patch
|
||||||
|
|
||||||
|
# New test for step-resume breakpoint placed in multiple threads at once.
|
||||||
|
#=fedoratest
|
||||||
|
Patch043: gdb-simultaneous-step-resume-breakpoint-test.patch
|
||||||
|
|
||||||
|
# Fix GNU/Linux core open: Can't read pathname for load map: Input/output error.
|
||||||
|
# Fix regression of undisplayed missing shared libraries caused by a fix for.
|
||||||
|
#=fedoratest: It should be in glibc: libc-alpha: <20091004161706.GA27450@.*>
|
||||||
|
Patch044: gdb-core-open-vdso-warning.patch
|
||||||
|
|
||||||
|
# Fix stepping with OMP parallel Fortran sections (BZ 533176).
|
||||||
|
#=push+jan: It requires some better DWARF annotations.
|
||||||
|
Patch045: gdb-bz533176-fortran-omp-step.patch
|
||||||
|
|
||||||
|
# Workaround ccache making lineno non-zero for command-line definitions.
|
||||||
|
#=fedoratest: ccache is rarely used and it is even fixed now.
|
||||||
|
Patch046: gdb-ccache-workaround.patch
|
||||||
|
|
||||||
|
#=push+jan: May get obsoleted by Tom's unrelocated objfiles patch.
|
||||||
|
Patch047: gdb-archer-pie-addons.patch
|
||||||
|
|
||||||
|
#=push+jan: Breakpoints disabling matching should not be based on address.
|
||||||
|
Patch048: gdb-archer-pie-addons-keep-disabled.patch
|
||||||
|
|
||||||
|
# Testcase for "Do not make up line information" fix by Daniel Jacobowitz.
|
||||||
|
#=fedoratest
|
||||||
|
Patch049: gdb-lineno-makeup-test.patch
|
||||||
|
|
||||||
|
# Test power7 ppc disassembly.
|
||||||
|
#=fedoratest
|
||||||
|
Patch050: gdb-ppc-power7-test.patch
|
||||||
|
|
||||||
|
# Workaround non-stop moribund locations exploited by kernel utrace (BZ 590623).
|
||||||
|
#=push+jan: Currently it is still not fully safe.
|
||||||
|
Patch051: gdb-moribund-utrace-workaround.patch
|
||||||
|
|
||||||
|
# Fix follow-exec for C++ programs (bugreported by Martin Stransky).
|
||||||
|
#=fedoratest
|
||||||
|
Patch052: gdb-archer-next-over-throw-cxx-exec.patch
|
||||||
|
|
||||||
|
# Backport DWARF-4 support (BZ 601887, Tom Tromey).
|
||||||
|
#=fedoratest
|
||||||
|
Patch053: gdb-bz601887-dwarf4-rh-test.patch
|
||||||
|
|
||||||
|
#=push+jan
|
||||||
|
Patch054: gdb-6.6-buildid-locate-core-as-arg.patch
|
||||||
|
|
||||||
|
# Workaround librpm BZ 643031 due to its unexpected exit() calls (BZ 642879).
|
||||||
|
#=push+jan
|
||||||
|
Patch055: gdb-6.6-buildid-locate-rpm-librpm-workaround.patch
|
||||||
|
|
||||||
|
# [delayed-symfile] Test a backtrace regression on CFIs without DIE (BZ 614604).
|
||||||
|
#=fedoratest
|
||||||
|
Patch056: gdb-test-bt-cfi-without-die.patch
|
||||||
|
|
||||||
|
# Verify GDB Python built-in function gdb.solib_address exists (BZ # 634108).
|
||||||
|
#=fedoratest
|
||||||
|
Patch057: gdb-bz634108-solib_address.patch
|
||||||
|
|
||||||
|
# New test gdb.arch/x86_64-pid0-core.exp for kernel PID 0 cores (BZ 611435).
|
||||||
|
#=fedoratest
|
||||||
|
Patch058: gdb-test-pid0-core.patch
|
||||||
|
|
||||||
|
# [archer-tromey-delayed-symfile] New test gdb.dwarf2/dw2-aranges.exp.
|
||||||
|
#=fedoratest
|
||||||
|
Patch059: gdb-test-dw2-aranges.patch
|
||||||
|
|
||||||
|
# [archer-keiths-expr-cumulative+upstream] Import C++ testcases.
|
||||||
|
#=fedoratest
|
||||||
|
Patch060: gdb-test-expr-cumulative-archer.patch
|
||||||
|
|
||||||
|
# Fix regressions on C++ names resolving (PR 11734, PR 12273, Keith Seitz).
|
||||||
|
#=fedoratest
|
||||||
|
Patch061: gdb-physname-pr11734-test.patch
|
||||||
|
|
||||||
|
# Fix regressions on C++ names resolving (PR 11734, PR 12273, Keith Seitz).
|
||||||
|
#=fedoratest
|
||||||
|
Patch062: gdb-physname-pr12273-test.patch
|
||||||
|
|
||||||
|
# Test GDB opcodes/ disassembly of Intel Ivy Bridge instructions (BZ 696890).
|
||||||
|
#=fedoratest
|
||||||
|
Patch063: gdb-test-ivy-bridge.patch
|
||||||
|
|
||||||
|
# Hack for proper PIE run of the testsuite.
|
||||||
|
#=fedoratest
|
||||||
|
Patch064: gdb-runtest-pie-override.patch
|
||||||
|
|
||||||
|
# Print reasons for failed attach/spawn incl. SELinux deny_ptrace (BZ 786878).
|
||||||
|
#=push+jan
|
||||||
|
Patch065: gdb-attach-fail-reasons-5of5.patch
|
||||||
|
|
||||||
|
# Workaround PR libc/14166 for inferior calls of strstr.
|
||||||
|
#=fedoratest: Compatibility with RHELs (unchecked which ones).
|
||||||
|
Patch066: gdb-glibc-strstr-workaround.patch
|
||||||
|
|
||||||
|
# Include testcase for `Unable to see a variable inside a module (XLF)' (BZ 823789).
|
||||||
|
#=fedoratest
|
||||||
|
Patch067: gdb-rhel5.9-testcase-xlf-var-inside-mod.patch
|
||||||
|
|
||||||
|
# Testcase for `Setting solib-absolute-prefix breaks vDSO' (BZ 818343).
|
||||||
|
#=fedoratest
|
||||||
|
Patch068: gdb-rhbz-818343-set-solib-absolute-prefix-testcase.patch
|
||||||
|
|
||||||
|
# Import regression test for `gdb/findvar.c:417: internal-error:
|
||||||
|
# read_var_value: Assertion `frame' failed.' (RH BZ 947564) from RHEL 6.5.
|
||||||
|
#=fedoratest
|
||||||
|
Patch069: gdb-rhbz947564-findvar-assertion-frame-failed-testcase.patch
|
||||||
|
|
||||||
|
# Fix crash of -readnow /usr/lib/debug/usr/bin/gnatbind.debug (BZ 1069211).
|
||||||
|
#=push+jan
|
||||||
|
Patch070: gdb-gnat-dwarf-crash-3of3.patch
|
||||||
|
|
||||||
|
# Fix 'memory leak in infpy_read_memory()' (RH BZ 1007614)
|
||||||
|
#=fedoratest
|
||||||
|
Patch071: gdb-rhbz1007614-memleak-infpy_read_memory-test.patch
|
||||||
|
|
||||||
|
# Fix 'gdb gives highly misleading error when debuginfo pkg is present,
|
||||||
|
# but not corresponding binary pkg' (RH BZ 981154).
|
||||||
|
#=push+jan
|
||||||
|
Patch072: gdb-6.6-buildid-locate-misleading-warning-missing-debuginfo-rhbz981154.patch
|
||||||
|
|
||||||
|
#=fedoratest
|
||||||
|
Patch073: gdb-archer-vla-tests.patch
|
||||||
|
|
||||||
|
#=fedoratest
|
||||||
|
Patch074: gdb-vla-intel-tests.patch
|
||||||
|
|
||||||
|
# Continue backtrace even if a frame filter throws an exception (Phil Muldoon).
|
||||||
|
#=push
|
||||||
|
Patch075: gdb-btrobust.patch
|
||||||
|
|
||||||
|
# Display Fortran strings in backtraces.
|
||||||
|
#=fedoratest
|
||||||
|
Patch076: gdb-fortran-frame-string.patch
|
||||||
|
|
||||||
|
# Testcase for '[SAP] Recursive dlopen causes SAP HANA installer to
|
||||||
|
# crash.' (RH BZ 1156192).
|
||||||
|
#=fedoratest
|
||||||
|
Patch077: gdb-rhbz1156192-recursive-dlopen-test.patch
|
||||||
|
|
||||||
|
# Fix jit-reader.h for multi-lib.
|
||||||
|
#=push+jan
|
||||||
|
Patch078: gdb-jit-reader-multilib.patch
|
||||||
|
|
||||||
|
# Fix '`catch syscall' doesn't work for parent after `fork' is called'
|
||||||
|
# (Philippe Waroquiers, RH BZ 1149205).
|
||||||
|
#=fedoratest
|
||||||
|
Patch079: gdb-rhbz1149205-catch-syscall-after-fork-test.patch
|
||||||
|
|
||||||
|
# Fix 'backport GDB 7.4 fix to RHEL 6.6 GDB' [Original Sourceware bug
|
||||||
|
# description: 'C++ (and objc): Internal error on unqualified name
|
||||||
|
# re-set', PR 11657] (RH BZ 1186476).
|
||||||
|
#=fedoratest
|
||||||
|
Patch080: gdb-rhbz1186476-internal-error-unqualified-name-re-set-test.patch
|
||||||
|
|
||||||
|
# Test 'info type-printers' Python error (RH BZ 1350436).
|
||||||
|
#=fedoratest
|
||||||
|
Patch081: gdb-rhbz1350436-type-printers-error.patch
|
||||||
|
|
||||||
|
# Fix '[ppc64] and [s390x] wrong prologue skip on -O2 -g code' (Jan
|
||||||
|
# Kratochvil, RH BZ 1084404).
|
||||||
|
#=fedoratest
|
||||||
|
Patch082: gdb-rhbz1084404-ppc64-s390x-wrong-prologue-skip-O2-g-3of3.patch
|
||||||
|
|
||||||
|
# Never kill PID on: gdb exec PID (Jan Kratochvil, RH BZ 1219747).
|
||||||
|
#=push+jan
|
||||||
|
Patch083: gdb-bz1219747-attach-kills.patch
|
||||||
|
|
||||||
|
# Force libncursesw over libncurses to match the includes (RH BZ 1270534).
|
||||||
|
#=push+jan
|
||||||
|
Patch084: gdb-fedora-libncursesw.patch
|
||||||
|
|
||||||
|
# Test clflushopt instruction decode (for RH BZ 1262471).
|
||||||
|
#=fedoratest
|
||||||
|
Patch085: gdb-opcodes-clflushopt-test.patch
|
||||||
|
|
||||||
|
# [rhel6] DTS backward Python compatibility API (BZ 1020004, Phil Muldoon).
|
||||||
|
#=fedora
|
||||||
|
Patch086: gdb-dts-rhel6-python-compat.patch
|
||||||
|
|
||||||
|
# [SCL] Skip deprecated .gdb_index warning for Red Hat built files (BZ 953585).
|
||||||
|
#=push+jan
|
||||||
|
Patch087: gdb-6.6-buildid-locate-rpm-scl.patch
|
||||||
|
|
||||||
|
# Make the GDB quit processing non-abortable to cleanup everything properly.
|
||||||
|
#=fedora: It was useful only after gdb-6.8-attach-signalled-detach-stopped.patch .
|
||||||
|
Patch088: gdb-6.8-quit-never-aborts.patch
|
||||||
|
|
||||||
|
# [aarch64] Fix hardware watchpoints (RH BZ 1261564).
|
||||||
|
#=fedoratest
|
||||||
|
Patch089: gdb-rhbz1261564-aarch64-hw-watchpoint-test.patch
|
||||||
|
|
||||||
|
# Add messages suggesting more recent RHEL gdbserver (RH BZ 1321114).
|
||||||
|
#=fedora
|
||||||
|
Patch090: gdb-container-rh-pkg.patch
|
||||||
|
|
||||||
|
# New test for Python "Cannot locate object file for block" (for RH BZ 1325795).
|
||||||
|
#=fedoratest
|
||||||
|
Patch091: gdb-rhbz1325795-framefilters-test.patch
|
||||||
|
|
||||||
|
# [dts+el7] [x86*] Bundle linux_perf.h for libipt (RH BZ 1256513).
|
||||||
|
#=fedora
|
||||||
|
Patch092: gdb-linux_perf-bundle.patch
|
||||||
|
|
||||||
|
# Fix gdb-headless /usr/bin/ executables (BZ 1390251).
|
||||||
|
#
|
||||||
|
# Also, make /usr/bin/gdb.minimal be the default GDB used, if it's
|
||||||
|
# present. For rationale, see:
|
||||||
|
#
|
||||||
|
# https://fedoraproject.org/wiki/Changes/Minimal_GDB_in_buildroot
|
||||||
|
#=fedora
|
||||||
|
Patch093: gdb-libexec-add-index.patch
|
||||||
|
|
||||||
|
# New testcase for: Fix <tab>-completion crash (Gary Benson, RH BZ 1398387).
|
||||||
|
#=fedoratest
|
||||||
|
Patch094: gdb-rhbz1398387-tab-crash-test.patch
|
||||||
|
|
||||||
|
# Python patches of: http://sourceware.org/gdb/wiki/ProjectArcher
|
||||||
|
#=push
|
||||||
|
Patch095: gdb-archer.patch
|
||||||
|
|
||||||
|
# Revert upstream commit 469412dd9ccc4de5874fd3299b105833f36b34cd
|
||||||
|
Patch096: gdb-vla-intel-fix-print-char-array.patch
|
||||||
|
|
||||||
|
# [s390x] Backport arch12 instructions decoding (RH BZ 1553104).
|
||||||
|
# =fedoratest
|
||||||
|
Patch097: gdb-rhbz1553104-s390x-arch12-test.patch
|
||||||
|
|
|
@ -0,0 +1,94 @@
|
||||||
|
%patch001 -p1
|
||||||
|
%patch002 -p1
|
||||||
|
%patch003 -p1
|
||||||
|
%patch004 -p1
|
||||||
|
%patch005 -p1
|
||||||
|
%patch006 -p1
|
||||||
|
%patch007 -p1
|
||||||
|
%patch008 -p1
|
||||||
|
%patch009 -p1
|
||||||
|
%patch010 -p1
|
||||||
|
%patch012 -p1
|
||||||
|
%patch013 -p1
|
||||||
|
%patch014 -p1
|
||||||
|
%patch015 -p1
|
||||||
|
%patch016 -p1
|
||||||
|
%patch017 -p1
|
||||||
|
%patch018 -p1
|
||||||
|
%patch019 -p1
|
||||||
|
%patch020 -p1
|
||||||
|
%patch021 -p1
|
||||||
|
%patch022 -p1
|
||||||
|
%patch023 -p1
|
||||||
|
%patch024 -p1
|
||||||
|
%patch025 -p1
|
||||||
|
%patch026 -p1
|
||||||
|
%patch028 -p1
|
||||||
|
%patch029 -p1
|
||||||
|
%patch030 -p1
|
||||||
|
%patch031 -p1
|
||||||
|
%patch032 -p1
|
||||||
|
%patch033 -p1
|
||||||
|
%patch034 -p1
|
||||||
|
%patch035 -p1
|
||||||
|
%patch036 -p1
|
||||||
|
%patch038 -p1
|
||||||
|
%patch039 -p1
|
||||||
|
%patch040 -p1
|
||||||
|
%patch041 -p1
|
||||||
|
%patch042 -p1
|
||||||
|
%patch043 -p1
|
||||||
|
%patch044 -p1
|
||||||
|
%patch045 -p1
|
||||||
|
%patch046 -p1
|
||||||
|
%patch047 -p1
|
||||||
|
%patch048 -p1
|
||||||
|
%patch049 -p1
|
||||||
|
%patch050 -p1
|
||||||
|
%patch051 -p1
|
||||||
|
%patch052 -p1
|
||||||
|
%patch053 -p1
|
||||||
|
%patch054 -p1
|
||||||
|
%patch055 -p1
|
||||||
|
%patch056 -p1
|
||||||
|
%patch057 -p1
|
||||||
|
%patch058 -p1
|
||||||
|
%patch059 -p1
|
||||||
|
%patch060 -p1
|
||||||
|
%patch061 -p1
|
||||||
|
%patch062 -p1
|
||||||
|
%patch063 -p1
|
||||||
|
%patch064 -p1
|
||||||
|
%patch065 -p1
|
||||||
|
%patch066 -p1
|
||||||
|
%patch067 -p1
|
||||||
|
%patch068 -p1
|
||||||
|
%patch069 -p1
|
||||||
|
%patch070 -p1
|
||||||
|
%patch071 -p1
|
||||||
|
%patch072 -p1
|
||||||
|
%patch073 -p1
|
||||||
|
%patch074 -p1
|
||||||
|
%patch075 -p1
|
||||||
|
%patch076 -p1
|
||||||
|
%patch077 -p1
|
||||||
|
%patch078 -p1
|
||||||
|
%patch079 -p1
|
||||||
|
%patch080 -p1
|
||||||
|
%patch081 -p1
|
||||||
|
%patch082 -p1
|
||||||
|
%patch083 -p1
|
||||||
|
%patch084 -p1
|
||||||
|
%patch085 -p1
|
||||||
|
%patch086 -p1
|
||||||
|
%patch087 -p1
|
||||||
|
%patch088 -p1
|
||||||
|
%patch089 -p1
|
||||||
|
%patch090 -p1
|
||||||
|
%patch091 -p1
|
||||||
|
%patch092 -p1
|
||||||
|
%patch093 -p1
|
||||||
|
%patch094 -p1
|
||||||
|
%patch095 -p1
|
||||||
|
%patch096 -p1
|
||||||
|
%patch097 -p1
|
|
@ -0,0 +1 @@
|
||||||
|
606e3fd147ed9a00df165e46f30fe5c46dcda345
|
|
@ -0,0 +1,97 @@
|
||||||
|
gdb-6.3-rh-testversion-20041202.patch
|
||||||
|
gdb-vla-intel-fortran-strides.patch
|
||||||
|
gdb-vla-intel-fortran-vla-strings.patch
|
||||||
|
gdb-vla-intel-stringbt-fix.patch
|
||||||
|
gdb-6.3-gstack-20050411.patch
|
||||||
|
gdb-6.3-test-pie-20050107.patch
|
||||||
|
gdb-6.3-test-self-20050110.patch
|
||||||
|
gdb-6.3-test-dtorfix-20050121.patch
|
||||||
|
gdb-6.3-test-movedir-20050125.patch
|
||||||
|
gdb-6.3-threaded-watchpoints2-20050225.patch
|
||||||
|
gdb-6.3-inferior-notification-20050721.patch
|
||||||
|
gdb-6.3-inheritancetest-20050726.patch
|
||||||
|
gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch
|
||||||
|
gdb-6.5-sharedlibrary-path.patch
|
||||||
|
gdb-6.5-BEA-testsuite.patch
|
||||||
|
gdb-6.5-last-address-space-byte-test.patch
|
||||||
|
gdb-6.5-readline-long-line-crash-test.patch
|
||||||
|
gdb-6.5-bz218379-ppc-solib-trampoline-test.patch
|
||||||
|
gdb-6.5-bz218379-solib-trampoline-lookup-lock-fix.patch
|
||||||
|
gdb-6.5-bz109921-DW_AT_decl_file-test.patch
|
||||||
|
gdb-6.3-bz140532-ppc-unwinding-test.patch
|
||||||
|
gdb-6.3-bz202689-exec-from-pthread-test.patch
|
||||||
|
gdb-6.6-bz230000-power6-disassembly-test.patch
|
||||||
|
gdb-6.6-bz229517-gcore-without-terminal.patch
|
||||||
|
gdb-6.6-testsuite-timeouts.patch
|
||||||
|
gdb-6.6-bz237572-ppc-atomic-sequence-test.patch
|
||||||
|
gdb-6.3-attach-see-vdso-test.patch
|
||||||
|
gdb-6.5-bz243845-stale-testing-zombie-test.patch
|
||||||
|
gdb-6.6-buildid-locate.patch
|
||||||
|
gdb-6.6-buildid-locate-solib-missing-ids.patch
|
||||||
|
gdb-6.6-buildid-locate-rpm.patch
|
||||||
|
gdb-6.7-charsign-test.patch
|
||||||
|
gdb-6.7-ppc-clobbered-registers-O2-test.patch
|
||||||
|
gdb-6.7-testsuite-stable-results.patch
|
||||||
|
gdb-6.5-ia64-libunwind-leak-test.patch
|
||||||
|
gdb-6.5-missed-trap-on-step-test.patch
|
||||||
|
gdb-6.5-gcore-buffer-limit-test.patch
|
||||||
|
gdb-6.3-mapping-zero-inode-test.patch
|
||||||
|
gdb-6.3-focus-cmd-prev-test.patch
|
||||||
|
gdb-6.8-bz442765-threaded-exec-test.patch
|
||||||
|
gdb-6.5-section-num-fixup-test.patch
|
||||||
|
gdb-6.8-bz466901-backtrace-full-prelinked.patch
|
||||||
|
gdb-simultaneous-step-resume-breakpoint-test.patch
|
||||||
|
gdb-core-open-vdso-warning.patch
|
||||||
|
gdb-bz533176-fortran-omp-step.patch
|
||||||
|
gdb-ccache-workaround.patch
|
||||||
|
gdb-archer-pie-addons.patch
|
||||||
|
gdb-archer-pie-addons-keep-disabled.patch
|
||||||
|
gdb-lineno-makeup-test.patch
|
||||||
|
gdb-ppc-power7-test.patch
|
||||||
|
gdb-moribund-utrace-workaround.patch
|
||||||
|
gdb-archer-next-over-throw-cxx-exec.patch
|
||||||
|
gdb-bz601887-dwarf4-rh-test.patch
|
||||||
|
gdb-6.6-buildid-locate-core-as-arg.patch
|
||||||
|
gdb-6.6-buildid-locate-rpm-librpm-workaround.patch
|
||||||
|
gdb-test-bt-cfi-without-die.patch
|
||||||
|
gdb-bz634108-solib_address.patch
|
||||||
|
gdb-test-pid0-core.patch
|
||||||
|
gdb-test-dw2-aranges.patch
|
||||||
|
gdb-test-expr-cumulative-archer.patch
|
||||||
|
gdb-physname-pr11734-test.patch
|
||||||
|
gdb-physname-pr12273-test.patch
|
||||||
|
gdb-test-ivy-bridge.patch
|
||||||
|
gdb-runtest-pie-override.patch
|
||||||
|
gdb-attach-fail-reasons-5of5.patch
|
||||||
|
gdb-glibc-strstr-workaround.patch
|
||||||
|
gdb-rhel5.9-testcase-xlf-var-inside-mod.patch
|
||||||
|
gdb-rhbz-818343-set-solib-absolute-prefix-testcase.patch
|
||||||
|
gdb-rhbz947564-findvar-assertion-frame-failed-testcase.patch
|
||||||
|
gdb-gnat-dwarf-crash-3of3.patch
|
||||||
|
gdb-rhbz1007614-memleak-infpy_read_memory-test.patch
|
||||||
|
gdb-6.6-buildid-locate-misleading-warning-missing-debuginfo-rhbz981154.patch
|
||||||
|
gdb-archer-vla-tests.patch
|
||||||
|
gdb-vla-intel-tests.patch
|
||||||
|
gdb-btrobust.patch
|
||||||
|
gdb-fortran-frame-string.patch
|
||||||
|
gdb-rhbz1156192-recursive-dlopen-test.patch
|
||||||
|
gdb-jit-reader-multilib.patch
|
||||||
|
gdb-rhbz1149205-catch-syscall-after-fork-test.patch
|
||||||
|
gdb-rhbz1186476-internal-error-unqualified-name-re-set-test.patch
|
||||||
|
gdb-rhbz1350436-type-printers-error.patch
|
||||||
|
gdb-rhbz1084404-ppc64-s390x-wrong-prologue-skip-O2-g-3of3.patch
|
||||||
|
gdb-bz1219747-attach-kills.patch
|
||||||
|
gdb-fedora-libncursesw.patch
|
||||||
|
gdb-opcodes-clflushopt-test.patch
|
||||||
|
gdb-dts-rhel6-python-compat.patch
|
||||||
|
gdb-6.6-buildid-locate-rpm-scl.patch
|
||||||
|
gdb-6.8-quit-never-aborts.patch
|
||||||
|
gdb-rhbz1261564-aarch64-hw-watchpoint-test.patch
|
||||||
|
gdb-container-rh-pkg.patch
|
||||||
|
gdb-rhbz1325795-framefilters-test.patch
|
||||||
|
gdb-linux_perf-bundle.patch
|
||||||
|
gdb-libexec-add-index.patch
|
||||||
|
gdb-rhbz1398387-tab-crash-test.patch
|
||||||
|
gdb-archer.patch
|
||||||
|
gdb-vla-intel-fix-print-char-array.patch
|
||||||
|
gdb-rhbz1553104-s390x-arch12-test.patch
|
|
@ -1,5 +1,15 @@
|
||||||
--- /dev/null 1 Jan 1970 00:00:00 -0000
|
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||||
+++ ./gdb/testsuite/gdb.base/attach-see-vdso.c 6 Jul 2007 14:14:44 -0000
|
From: Fedora GDB patches <invalid@email.com>
|
||||||
|
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||||
|
Subject: gdb-6.3-attach-see-vdso-test.patch
|
||||||
|
|
||||||
|
;; Test kernel VDSO decoding while attaching to an i386 process.
|
||||||
|
;;=fedoratest
|
||||||
|
|
||||||
|
diff --git a/gdb/testsuite/gdb.base/attach-see-vdso.c b/gdb/testsuite/gdb.base/attach-see-vdso.c
|
||||||
|
new file mode 100644
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/gdb/testsuite/gdb.base/attach-see-vdso.c
|
||||||
@@ -0,0 +1,25 @@
|
@@ -0,0 +1,25 @@
|
||||||
+/* This testcase is part of GDB, the GNU debugger.
|
+/* This testcase is part of GDB, the GNU debugger.
|
||||||
+
|
+
|
||||||
|
@ -26,9 +36,11 @@
|
||||||
+ pause ();
|
+ pause ();
|
||||||
+ return 1;
|
+ return 1;
|
||||||
+}
|
+}
|
||||||
--- /dev/null 1 Jan 1970 00:00:00 -0000
|
diff --git a/gdb/testsuite/gdb.base/attach-see-vdso.exp b/gdb/testsuite/gdb.base/attach-see-vdso.exp
|
||||||
+++ ./gdb/testsuite/gdb.base/attach-see-vdso.exp 6 Jul 2007 14:14:44 -0000
|
new file mode 100644
|
||||||
@@ -0,0 +1,79 @@
|
--- /dev/null
|
||||||
|
+++ b/gdb/testsuite/gdb.base/attach-see-vdso.exp
|
||||||
|
@@ -0,0 +1,72 @@
|
||||||
+# Copyright 2007
|
+# Copyright 2007
|
||||||
+
|
+
|
||||||
+# This program is free software; you can redistribute it and/or modify
|
+# This program is free software; you can redistribute it and/or modify
|
||||||
|
@ -47,13 +59,6 @@
|
||||||
+
|
+
|
||||||
+# This file was created by Jan Kratochvil <jan.kratochvil@redhat.com>.
|
+# This file was created by Jan Kratochvil <jan.kratochvil@redhat.com>.
|
||||||
+
|
+
|
||||||
+if $tracelevel then {
|
|
||||||
+ strace $tracelevel
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+set prms_id 0
|
|
||||||
+set bug_id 0
|
|
||||||
+
|
|
||||||
+# This test only works on Linux
|
+# This test only works on Linux
|
||||||
+if { ![istarget "*-*-linux-gnu*"] } {
|
+if { ![istarget "*-*-linux-gnu*"] } {
|
||||||
+ return 0
|
+ return 0
|
||||||
|
@ -61,8 +66,8 @@
|
||||||
+
|
+
|
||||||
+set testfile "attach-see-vdso"
|
+set testfile "attach-see-vdso"
|
||||||
+set srcfile ${testfile}.c
|
+set srcfile ${testfile}.c
|
||||||
+set binfile ${objdir}/${subdir}/${testfile}
|
+set binfile [standard_output_file ${testfile}]
|
||||||
+set escapedbinfile [string_to_regexp ${objdir}/${subdir}/${testfile}]
|
+set escapedbinfile [string_to_regexp [standard_output_file ${testfile}]]
|
||||||
+
|
+
|
||||||
+# The kernel VDSO is used for the syscalls returns only on i386 (not x86_64).
|
+# The kernel VDSO is used for the syscalls returns only on i386 (not x86_64).
|
||||||
+#
|
+#
|
||||||
|
|
|
@ -1,88 +0,0 @@
|
||||||
2005-12-01 Jeff Johnston <jjohnstn@redhat.com>
|
|
||||||
|
|
||||||
* frame.c (backtrace_past_zero_pc): New static variable.
|
|
||||||
(get_prev_frame): Don't return NULL for zero pc value if
|
|
||||||
backtrace past-zero-frame option is turned on.
|
|
||||||
(_initialize_frame): Initialize new command to allow backtracing
|
|
||||||
past a zero pc value (set backtrace past-zero-pc).
|
|
||||||
|
|
||||||
testsuite/gdb.base:
|
|
||||||
2005-12-01 Jeff Johnston <jjohnstn@redhat.com>
|
|
||||||
|
|
||||||
* setshow.exp: Add testing of "set backtrace past-zero-pc" option.
|
|
||||||
|
|
||||||
2007-10-15 Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
||||||
|
|
||||||
Port to GDB-6.7.
|
|
||||||
|
|
||||||
Index: gdb-6.7/gdb/testsuite/gdb.base/setshow.exp
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.7.orig/gdb/testsuite/gdb.base/setshow.exp 2007-08-23 20:14:17.000000000 +0200
|
|
||||||
+++ gdb-6.7/gdb/testsuite/gdb.base/setshow.exp 2007-10-15 21:34:52.000000000 +0200
|
|
||||||
@@ -106,6 +106,16 @@ if { ![target_info exists use_gdb_stub]
|
|
||||||
delete_breakpoints
|
|
||||||
gdb_test "run" "Starting program:.*foo bar blup baz bubble.*" "passing args"
|
|
||||||
}
|
|
||||||
+#test show backtrace past-zero-pc
|
|
||||||
+gdb_test "show backtrace past-zero-pc" "Whether backtraces should continue past a zero pc value is off." "default show backtrace past-zero-pc (off)"
|
|
||||||
+#test set backtrace past-zero-pc on
|
|
||||||
+gdb_test "set backtrace past-zero-pc on" "" "set backtrace past-zero-pc on"
|
|
||||||
+#test show backtrace past-zero-pc
|
|
||||||
+gdb_test "show backtrace past-zero-pc" "Whether backtraces should continue past a zero pc value is on." "show backtrace past-zero-pc (on)"
|
|
||||||
+#test set backtrace past-zero-pc off
|
|
||||||
+gdb_test "set backtrace past-zero-pc off" "" "set backtrace past-zero-pc off"
|
|
||||||
+#test show backtrace past-zero-pc
|
|
||||||
+gdb_test "show backtrace past-zero-pc" "Whether backtraces should continue past a zero pc value is off." "show backtrace past-zero-pc (off)"
|
|
||||||
#test set check range on
|
|
||||||
gdb_test "set check range on" "" "set check range on"
|
|
||||||
#test show check range on
|
|
||||||
Index: gdb-6.7/gdb/frame.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.7.orig/gdb/frame.c 2007-10-12 22:35:58.000000000 +0200
|
|
||||||
+++ gdb-6.7/gdb/frame.c 2007-10-15 21:34:52.000000000 +0200
|
|
||||||
@@ -133,6 +133,16 @@ Whether backtraces should continue past
|
|
||||||
value);
|
|
||||||
}
|
|
||||||
|
|
||||||
+static int backtrace_past_zero_pc;
|
|
||||||
+static void
|
|
||||||
+show_backtrace_past_zero_pc (struct ui_file *file, int from_tty,
|
|
||||||
+ struct cmd_list_element *c, const char *value)
|
|
||||||
+{
|
|
||||||
+ fprintf_filtered (file, _("\
|
|
||||||
+Whether backtraces should continue past a zero pc value is %s.\n"),
|
|
||||||
+ value);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
static int backtrace_past_entry;
|
|
||||||
static void
|
|
||||||
show_backtrace_past_entry (struct ui_file *file, int from_tty,
|
|
||||||
@@ -1483,9 +1493,7 @@ get_prev_frame (struct frame_info *this_
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this_frame->level > 0
|
|
||||||
-#if 0
|
|
||||||
- && backtrace_past_zero_pc
|
|
||||||
-#endif
|
|
||||||
+ && !backtrace_past_zero_pc
|
|
||||||
&& get_frame_type (this_frame) == NORMAL_FRAME
|
|
||||||
&& get_frame_type (get_next_frame (this_frame)) == NORMAL_FRAME
|
|
||||||
&& get_frame_pc (this_frame) == 0)
|
|
||||||
@@ -1850,6 +1858,17 @@ the rest of the stack trace."),
|
|
||||||
&set_backtrace_cmdlist,
|
|
||||||
&show_backtrace_cmdlist);
|
|
||||||
|
|
||||||
+ add_setshow_boolean_cmd ("past-zero-pc", class_obscure,
|
|
||||||
+ &backtrace_past_zero_pc, _("\
|
|
||||||
+Set whether backtraces should continue past a zero pc value."), _("\
|
|
||||||
+Show whether backtraces should continue past a zero pc value."), _("\
|
|
||||||
+Normally GDB stops backtracing when it finds a zero pc.\n\
|
|
||||||
+Set this variable if you need to see the rest of the stack trace."),
|
|
||||||
+ NULL,
|
|
||||||
+ show_backtrace_past_zero_pc,
|
|
||||||
+ &set_backtrace_cmdlist,
|
|
||||||
+ &show_backtrace_cmdlist);
|
|
||||||
+
|
|
||||||
add_setshow_integer_cmd ("limit", class_obscure,
|
|
||||||
&backtrace_limit, _("\
|
|
||||||
Set an upper bound on the number of backtrace levels."), _("\
|
|
|
@ -1,6 +1,15 @@
|
||||||
diff -u -ruNp gdb-6.3-unpatched/gdb/testsuite/gdb.arch/powerpc-bcl-prologue-asm32.S gdb-6.3/gdb/testsuite/gdb.arch/powerpc-bcl-prologue-asm32.S
|
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||||
--- gdb-6.3-unpatched/gdb/testsuite/gdb.arch/powerpc-bcl-prologue-asm32.S 1969-12-31 19:00:00.000000000 -0500
|
From: Fedora GDB patches <invalid@email.com>
|
||||||
+++ gdb-6.3/gdb/testsuite/gdb.arch/powerpc-bcl-prologue-asm32.S 2007-08-02 13:23:10.000000000 -0400
|
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||||
|
Subject: gdb-6.3-bz140532-ppc-unwinding-test.patch
|
||||||
|
|
||||||
|
;; Update PPC unwinding patches to their upstream variants (BZ 140532).
|
||||||
|
;;=fedoratest
|
||||||
|
|
||||||
|
diff --git a/gdb/testsuite/gdb.arch/powerpc-bcl-prologue-asm32.S b/gdb/testsuite/gdb.arch/powerpc-bcl-prologue-asm32.S
|
||||||
|
new file mode 100644
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/gdb/testsuite/gdb.arch/powerpc-bcl-prologue-asm32.S
|
||||||
@@ -0,0 +1,78 @@
|
@@ -0,0 +1,78 @@
|
||||||
+/* This testcase is part of GDB, the GNU debugger.
|
+/* This testcase is part of GDB, the GNU debugger.
|
||||||
+
|
+
|
||||||
|
@ -80,9 +89,10 @@ diff -u -ruNp gdb-6.3-unpatched/gdb/testsuite/gdb.arch/powerpc-bcl-prologue-asm3
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
+*/
|
+*/
|
||||||
diff -u -ruNp gdb-6.3-unpatched/gdb/testsuite/gdb.arch/powerpc-bcl-prologue-asm64.S gdb-6.3/gdb/testsuite/gdb.arch/powerpc-bcl-prologue-asm64.S
|
diff --git a/gdb/testsuite/gdb.arch/powerpc-bcl-prologue-asm64.S b/gdb/testsuite/gdb.arch/powerpc-bcl-prologue-asm64.S
|
||||||
--- gdb-6.3-unpatched/gdb/testsuite/gdb.arch/powerpc-bcl-prologue-asm64.S 1969-12-31 19:00:00.000000000 -0500
|
new file mode 100644
|
||||||
+++ gdb-6.3/gdb/testsuite/gdb.arch/powerpc-bcl-prologue-asm64.S 2007-08-02 14:28:56.000000000 -0400
|
--- /dev/null
|
||||||
|
+++ b/gdb/testsuite/gdb.arch/powerpc-bcl-prologue-asm64.S
|
||||||
@@ -0,0 +1,98 @@
|
@@ -0,0 +1,98 @@
|
||||||
+/* This testcase is part of GDB, the GNU debugger.
|
+/* This testcase is part of GDB, the GNU debugger.
|
||||||
+
|
+
|
||||||
|
@ -182,9 +192,10 @@ diff -u -ruNp gdb-6.3-unpatched/gdb/testsuite/gdb.arch/powerpc-bcl-prologue-asm6
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
+*/
|
+*/
|
||||||
diff -u -ruNp gdb-6.3-unpatched/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.c gdb-6.3/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.c
|
diff --git a/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.c b/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.c
|
||||||
--- gdb-6.3-unpatched/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.c 1969-12-31 19:00:00.000000000 -0500
|
new file mode 100644
|
||||||
+++ gdb-6.3/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.c 2007-08-02 13:25:10.000000000 -0400
|
--- /dev/null
|
||||||
|
+++ b/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.c
|
||||||
@@ -0,0 +1,29 @@
|
@@ -0,0 +1,29 @@
|
||||||
+/* This testcase is part of GDB, the GNU debugger.
|
+/* This testcase is part of GDB, the GNU debugger.
|
||||||
+
|
+
|
||||||
|
@ -215,10 +226,11 @@ diff -u -ruNp gdb-6.3-unpatched/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.c gd
|
||||||
+ func1 ();
|
+ func1 ();
|
||||||
+ return 0;
|
+ return 0;
|
||||||
+}
|
+}
|
||||||
diff -u -ruNp gdb-6.3-unpatched/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.exp gdb-6.3/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.exp
|
diff --git a/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.exp b/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.exp
|
||||||
--- gdb-6.3-unpatched/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.exp 1969-12-31 19:00:00.000000000 -0500
|
new file mode 100644
|
||||||
+++ gdb-6.3/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.exp 2007-08-02 14:21:29.000000000 -0400
|
--- /dev/null
|
||||||
@@ -0,0 +1,79 @@
|
+++ b/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.exp
|
||||||
|
@@ -0,0 +1,72 @@
|
||||||
+# Copyright 2006, 2007 Free Software Foundation, Inc.
|
+# Copyright 2006, 2007 Free Software Foundation, Inc.
|
||||||
+
|
+
|
||||||
+# This program is free software; you can redistribute it and/or modify
|
+# This program is free software; you can redistribute it and/or modify
|
||||||
|
@ -238,13 +250,6 @@ diff -u -ruNp gdb-6.3-unpatched/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.exp
|
||||||
+# Test unwinding fixes of the PPC platform, specifically on the coping with BCL
|
+# Test unwinding fixes of the PPC platform, specifically on the coping with BCL
|
||||||
+# jump of the PIE code.
|
+# jump of the PIE code.
|
||||||
+
|
+
|
||||||
+if $tracelevel then {
|
|
||||||
+ strace $tracelevel
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+set prms_id 0
|
|
||||||
+set bug_id 0
|
|
||||||
+
|
|
||||||
+if ![istarget "powerpc*-*-linux*"] then {
|
+if ![istarget "powerpc*-*-linux*"] then {
|
||||||
+ verbose "Skipping powerpc-linux prologue tests."
|
+ verbose "Skipping powerpc-linux prologue tests."
|
||||||
+ return
|
+ return
|
||||||
|
@ -263,8 +268,8 @@ diff -u -ruNp gdb-6.3-unpatched/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.exp
|
||||||
+ fail "powerpc arch test"
|
+ fail "powerpc arch test"
|
||||||
+ return
|
+ return
|
||||||
+}
|
+}
|
||||||
+set objfile2 ${objdir}/${subdir}/${testfile}-asm.o
|
+set objfile2 [standard_output_file ${testfile}-asm.o]
|
||||||
+set binfile ${objdir}/${subdir}/${testfile}
|
+set binfile [standard_output_file ${testfile}]
|
||||||
+
|
+
|
||||||
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile1} ${srcdir}/${subdir}/${srcfile2}" ${binfile} executable $flags] != ""} {
|
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile1} ${srcdir}/${subdir}/${srcfile2}" ${binfile} executable $flags] != ""} {
|
||||||
+ return -1
|
+ return -1
|
||||||
|
@ -298,12 +303,10 @@ diff -u -ruNp gdb-6.3-unpatched/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.exp
|
||||||
+ pass $test
|
+ pass $test
|
||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
|
diff --git a/gdb/testsuite/gdb.arch/powerpc-prologue.exp b/gdb/testsuite/gdb.arch/powerpc-prologue.exp
|
||||||
Fixup the testcase for ppc64 biarch GDB.
|
--- a/gdb/testsuite/gdb.arch/powerpc-prologue.exp
|
||||||
|
+++ b/gdb/testsuite/gdb.arch/powerpc-prologue.exp
|
||||||
--- ./gdb/testsuite/gdb.arch/powerpc-prologue.exp 2008-01-13 13:32:19.000000000 +0100
|
@@ -16,8 +16,9 @@
|
||||||
+++ ./gdb/testsuite/gdb.arch/powerpc-prologue.exp 2008-01-02 00:04:10.000000000 +0100
|
|
||||||
@@ -17,8 +17,9 @@
|
|
||||||
# Test PowerPC prologue analyzer.
|
# Test PowerPC prologue analyzer.
|
||||||
|
|
||||||
# Do not run on AIX (where we won't be able to build the tests without
|
# Do not run on AIX (where we won't be able to build the tests without
|
||||||
|
|
|
@ -1,23 +0,0 @@
|
||||||
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=182116
|
|
||||||
|
|
||||||
|
|
||||||
Index: gdb-6.5/gdb/linux-thread-db.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.5.orig/gdb/linux-thread-db.c 2006-08-24 02:55:24.000000000 -0300
|
|
||||||
+++ gdb-6.5/gdb/linux-thread-db.c 2006-08-24 02:56:16.000000000 -0300
|
|
||||||
@@ -939,6 +939,15 @@ thread_db_wait (ptid_t ptid, struct targ
|
|
||||||
|| ourstatus->kind == TARGET_WAITKIND_SIGNALLED)
|
|
||||||
return pid_to_ptid (-1);
|
|
||||||
|
|
||||||
+ if (ourstatus->kind == TARGET_WAITKIND_EXECD)
|
|
||||||
+ {
|
|
||||||
+ remove_thread_event_breakpoints ();
|
|
||||||
+ unpush_target (&thread_db_ops);
|
|
||||||
+ using_thread_db = 0;
|
|
||||||
+
|
|
||||||
+ return pid_to_ptid (GET_PID (ptid));
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
if (ourstatus->kind == TARGET_WAITKIND_STOPPED
|
|
||||||
&& (ourstatus->value.sig == TARGET_SIGNAL_TRAP
|
|
||||||
|| ourstatus->value.sig == TARGET_SIGNAL_ILL))
|
|
|
@ -1,10 +1,19 @@
|
||||||
|
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||||
|
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||||
|
Subject: gdb-6.3-bz202689-exec-from-pthread-test.patch
|
||||||
|
|
||||||
|
;; Testcase for exec() from threaded program (BZ 202689).
|
||||||
|
;;=fedoratest
|
||||||
|
|
||||||
2007-01-17 Jan Kratochvil <jan.kratochvil@redhat.com>
|
2007-01-17 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||||
|
|
||||||
* gdb.threads/threaded-exec.exp, gdb.threads/threaded-exec.c: New files.
|
* gdb.threads/threaded-exec.exp, gdb.threads/threaded-exec.c: New files.
|
||||||
|
|
||||||
|
diff --git a/gdb/testsuite/gdb.threads/threaded-exec.c b/gdb/testsuite/gdb.threads/threaded-exec.c
|
||||||
--- /dev/null 1 Jan 1970 00:00:00 -0000
|
new file mode 100644
|
||||||
+++ ./gdb/testsuite/gdb.threads/threaded-exec.c 17 Jan 2007 23:10:22 -0000
|
--- /dev/null
|
||||||
|
+++ b/gdb/testsuite/gdb.threads/threaded-exec.c
|
||||||
@@ -0,0 +1,46 @@
|
@@ -0,0 +1,46 @@
|
||||||
+/* This testcase is part of GDB, the GNU debugger.
|
+/* This testcase is part of GDB, the GNU debugger.
|
||||||
+
|
+
|
||||||
|
@ -52,8 +61,10 @@
|
||||||
+ execl ("/bin/true", "/bin/true", NULL);
|
+ execl ("/bin/true", "/bin/true", NULL);
|
||||||
+ abort ();
|
+ abort ();
|
||||||
+}
|
+}
|
||||||
--- /dev/null 1 Jan 1970 00:00:00 -0000
|
diff --git a/gdb/testsuite/gdb.threads/threaded-exec.exp b/gdb/testsuite/gdb.threads/threaded-exec.exp
|
||||||
+++ ./gdb/testsuite/gdb.threads/threaded-exec.exp 17 Jan 2007 23:10:22 -0000
|
new file mode 100644
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/gdb/testsuite/gdb.threads/threaded-exec.exp
|
||||||
@@ -0,0 +1,41 @@
|
@@ -0,0 +1,41 @@
|
||||||
+# threaded-exec.exp -- Check reset of the tracked threads on exec*(2)
|
+# threaded-exec.exp -- Check reset of the tracked threads on exec*(2)
|
||||||
+# Copyright (C) 2007 Free Software Foundation, Inc.
|
+# Copyright (C) 2007 Free Software Foundation, Inc.
|
||||||
|
@ -77,7 +88,7 @@
|
||||||
+
|
+
|
||||||
+set testfile threaded-exec
|
+set testfile threaded-exec
|
||||||
+set srcfile ${testfile}.c
|
+set srcfile ${testfile}.c
|
||||||
+set binfile ${objdir}/${subdir}/${testfile}
|
+set binfile [standard_output_file ${testfile}]
|
||||||
+
|
+
|
||||||
+if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable []] != "" } {
|
+if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable []] != "" } {
|
||||||
+ return -1
|
+ return -1
|
||||||
|
@ -92,7 +103,7 @@
|
||||||
+gdb_run_cmd
|
+gdb_run_cmd
|
||||||
+
|
+
|
||||||
+gdb_test_multiple {} "Program exited" {
|
+gdb_test_multiple {} "Program exited" {
|
||||||
+ -re "\r\nProgram exited normally.\r\n$gdb_prompt $" {
|
+ -re "\r\n\\\[Inferior .* exited normally\\\]\r\n$gdb_prompt $" {
|
||||||
+ pass "Program exited"
|
+ pass "Program exited"
|
||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
|
|
|
@ -1,201 +0,0 @@
|
||||||
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=231832
|
|
||||||
|
|
||||||
|
|
||||||
Index: gdb-6.8/gdb/symmisc.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.8.orig/gdb/symmisc.c 2008-03-17 16:06:24.000000000 +0100
|
|
||||||
+++ gdb-6.8/gdb/symmisc.c 2008-07-14 10:27:50.000000000 +0200
|
|
||||||
@@ -230,8 +230,8 @@ print_objfile_statistics (void)
|
|
||||||
if (OBJSTAT (objfile, sz_strtab) > 0)
|
|
||||||
printf_filtered (_(" Space used by a.out string tables: %d\n"),
|
|
||||||
OBJSTAT (objfile, sz_strtab));
|
|
||||||
- printf_filtered (_(" Total memory used for objfile obstack: %d\n"),
|
|
||||||
- obstack_memory_used (&objfile->objfile_obstack));
|
|
||||||
+ printf_filtered (_(" Total memory used for objfile obstack: %ld\n"),
|
|
||||||
+ (long) obstack_memory_used (&objfile->objfile_obstack));
|
|
||||||
printf_filtered (_(" Total memory used for psymbol cache: %d\n"),
|
|
||||||
bcache_memory_used (objfile->psymbol_cache));
|
|
||||||
printf_filtered (_(" Total memory used for macro cache: %d\n"),
|
|
||||||
Index: gdb-6.8/include/obstack.h
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.8.orig/include/obstack.h 2005-05-10 12:21:08.000000000 +0200
|
|
||||||
+++ gdb-6.8/include/obstack.h 2008-07-14 10:27:50.000000000 +0200
|
|
||||||
@@ -188,31 +188,31 @@ struct obstack /* control current objec
|
|
||||||
|
|
||||||
/* Declare the external functions we use; they are in obstack.c. */
|
|
||||||
|
|
||||||
-extern void _obstack_newchunk (struct obstack *, int);
|
|
||||||
+extern void _obstack_newchunk (struct obstack *, PTR_INT_TYPE);
|
|
||||||
extern void _obstack_free (struct obstack *, void *);
|
|
||||||
-extern int _obstack_begin (struct obstack *, int, int,
|
|
||||||
+extern int _obstack_begin (struct obstack *, PTR_INT_TYPE, int,
|
|
||||||
void *(*) (long), void (*) (void *));
|
|
||||||
-extern int _obstack_begin_1 (struct obstack *, int, int,
|
|
||||||
+extern int _obstack_begin_1 (struct obstack *, PTR_INT_TYPE, int,
|
|
||||||
void *(*) (void *, long),
|
|
||||||
void (*) (void *, void *), void *);
|
|
||||||
-extern int _obstack_memory_used (struct obstack *);
|
|
||||||
+extern PTR_INT_TYPE _obstack_memory_used (struct obstack *);
|
|
||||||
|
|
||||||
/* Do the function-declarations after the structs
|
|
||||||
but before defining the macros. */
|
|
||||||
|
|
||||||
void obstack_init (struct obstack *obstack);
|
|
||||||
|
|
||||||
-void * obstack_alloc (struct obstack *obstack, int size);
|
|
||||||
+void * obstack_alloc (struct obstack *obstack, PTR_INT_TYPE size);
|
|
||||||
|
|
||||||
-void * obstack_copy (struct obstack *obstack, void *address, int size);
|
|
||||||
-void * obstack_copy0 (struct obstack *obstack, void *address, int size);
|
|
||||||
+void * obstack_copy (struct obstack *obstack, void *address, PTR_INT_TYPE size);
|
|
||||||
+void * obstack_copy0 (struct obstack *obstack, void *address, PTR_INT_TYPE size);
|
|
||||||
|
|
||||||
void obstack_free (struct obstack *obstack, void *block);
|
|
||||||
|
|
||||||
-void obstack_blank (struct obstack *obstack, int size);
|
|
||||||
+void obstack_blank (struct obstack *obstack, PTR_INT_TYPE size);
|
|
||||||
|
|
||||||
-void obstack_grow (struct obstack *obstack, void *data, int size);
|
|
||||||
-void obstack_grow0 (struct obstack *obstack, void *data, int size);
|
|
||||||
+void obstack_grow (struct obstack *obstack, void *data, PTR_INT_TYPE size);
|
|
||||||
+void obstack_grow0 (struct obstack *obstack, void *data, PTR_INT_TYPE size);
|
|
||||||
|
|
||||||
void obstack_1grow (struct obstack *obstack, int data_char);
|
|
||||||
void obstack_ptr_grow (struct obstack *obstack, void *data);
|
|
||||||
@@ -220,20 +220,20 @@ void obstack_int_grow (struct obstack *o
|
|
||||||
|
|
||||||
void * obstack_finish (struct obstack *obstack);
|
|
||||||
|
|
||||||
-int obstack_object_size (struct obstack *obstack);
|
|
||||||
+PTR_INT_TYPE obstack_object_size (struct obstack *obstack);
|
|
||||||
|
|
||||||
-int obstack_room (struct obstack *obstack);
|
|
||||||
-void obstack_make_room (struct obstack *obstack, int size);
|
|
||||||
+PTR_INT_TYPE obstack_room (struct obstack *obstack);
|
|
||||||
+void obstack_make_room (struct obstack *obstack, PTR_INT_TYPE size);
|
|
||||||
void obstack_1grow_fast (struct obstack *obstack, int data_char);
|
|
||||||
void obstack_ptr_grow_fast (struct obstack *obstack, void *data);
|
|
||||||
void obstack_int_grow_fast (struct obstack *obstack, int data);
|
|
||||||
-void obstack_blank_fast (struct obstack *obstack, int size);
|
|
||||||
+void obstack_blank_fast (struct obstack *obstack, PTR_INT_TYPE size);
|
|
||||||
|
|
||||||
void * obstack_base (struct obstack *obstack);
|
|
||||||
void * obstack_next_free (struct obstack *obstack);
|
|
||||||
int obstack_alignment_mask (struct obstack *obstack);
|
|
||||||
-int obstack_chunk_size (struct obstack *obstack);
|
|
||||||
-int obstack_memory_used (struct obstack *obstack);
|
|
||||||
+size_t obstack_chunk_size (struct obstack *obstack);
|
|
||||||
+size_t obstack_memory_used (struct obstack *obstack);
|
|
||||||
|
|
||||||
/* Error handler called when `obstack_chunk_alloc' failed to allocate
|
|
||||||
more memory. This can be set to a user defined function. The
|
|
||||||
@@ -318,7 +318,7 @@ extern int obstack_exit_failure;
|
|
||||||
# define obstack_make_room(OBSTACK,length) \
|
|
||||||
__extension__ \
|
|
||||||
({ struct obstack *__o = (OBSTACK); \
|
|
||||||
- int __len = (length); \
|
|
||||||
+ PTR_INT_TYPE __len = (length); \
|
|
||||||
if (__o->chunk_limit - __o->next_free < __len) \
|
|
||||||
_obstack_newchunk (__o, __len); \
|
|
||||||
(void) 0; })
|
|
||||||
@@ -331,7 +331,7 @@ __extension__ \
|
|
||||||
# define obstack_grow(OBSTACK,where,length) \
|
|
||||||
__extension__ \
|
|
||||||
({ struct obstack *__o = (OBSTACK); \
|
|
||||||
- int __len = (length); \
|
|
||||||
+ PTR_INT_TYPE __len = (length); \
|
|
||||||
if (__o->next_free + __len > __o->chunk_limit) \
|
|
||||||
_obstack_newchunk (__o, __len); \
|
|
||||||
_obstack_memcpy (__o->next_free, (where), __len); \
|
|
||||||
@@ -341,7 +341,7 @@ __extension__ \
|
|
||||||
# define obstack_grow0(OBSTACK,where,length) \
|
|
||||||
__extension__ \
|
|
||||||
({ struct obstack *__o = (OBSTACK); \
|
|
||||||
- int __len = (length); \
|
|
||||||
+ PTR_INT_TYPE __len = (length); \
|
|
||||||
if (__o->next_free + __len + 1 > __o->chunk_limit) \
|
|
||||||
_obstack_newchunk (__o, __len + 1); \
|
|
||||||
_obstack_memcpy (__o->next_free, (where), __len); \
|
|
||||||
@@ -392,7 +392,7 @@ __extension__ \
|
|
||||||
# define obstack_blank(OBSTACK,length) \
|
|
||||||
__extension__ \
|
|
||||||
({ struct obstack *__o = (OBSTACK); \
|
|
||||||
- int __len = (length); \
|
|
||||||
+ PTR_INT_TYPE __len = (length); \
|
|
||||||
if (__o->chunk_limit - __o->next_free < __len) \
|
|
||||||
_obstack_newchunk (__o, __len); \
|
|
||||||
obstack_blank_fast (__o, __len); \
|
|
||||||
@@ -532,7 +532,7 @@ __extension__ \
|
|
||||||
# define obstack_free(h,obj) \
|
|
||||||
( (h)->temp = (char *) (obj) - (char *) (h)->chunk, \
|
|
||||||
(((h)->temp > 0 && (h)->temp < (h)->chunk_limit - (char *) (h)->chunk)\
|
|
||||||
- ? (int) ((h)->next_free = (h)->object_base \
|
|
||||||
+ ? (PTR_INT_TYPE) ((h)->next_free = (h)->object_base \
|
|
||||||
= (h)->temp + (char *) (h)->chunk) \
|
|
||||||
: (((obstack_free) ((h), (h)->temp + (char *) (h)->chunk), 0), 0)))
|
|
||||||
|
|
||||||
Index: gdb-6.8/libiberty/obstack.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.8.orig/libiberty/obstack.c 2005-05-10 17:33:33.000000000 +0200
|
|
||||||
+++ gdb-6.8/libiberty/obstack.c 2008-07-14 10:27:50.000000000 +0200
|
|
||||||
@@ -44,9 +44,11 @@
|
|
||||||
#if !defined (_LIBC) && defined (__GNU_LIBRARY__) && __GNU_LIBRARY__ > 1
|
|
||||||
#include <gnu-versions.h>
|
|
||||||
#if _GNU_OBSTACK_INTERFACE_VERSION == OBSTACK_INTERFACE_VERSION
|
|
||||||
+#if 0 /* 64-bit obstack is not compatible with any glibc implementation. */
|
|
||||||
#define ELIDE_CODE
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef ELIDE_CODE
|
|
||||||
@@ -139,7 +141,7 @@ struct obstack *_obstack;
|
|
||||||
free up some memory, then call this again. */
|
|
||||||
|
|
||||||
int
|
|
||||||
-_obstack_begin (struct obstack *h, int size, int alignment,
|
|
||||||
+_obstack_begin (struct obstack *h, PTR_INT_TYPE size, int alignment,
|
|
||||||
POINTER (*chunkfun) (long), void (*freefun) (void *))
|
|
||||||
{
|
|
||||||
register struct _obstack_chunk *chunk; /* points to new chunk */
|
|
||||||
@@ -183,7 +185,7 @@ _obstack_begin (struct obstack *h, int s
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
|
||||||
-_obstack_begin_1 (struct obstack *h, int size, int alignment,
|
|
||||||
+_obstack_begin_1 (struct obstack *h, PTR_INT_TYPE size, int alignment,
|
|
||||||
POINTER (*chunkfun) (POINTER, long),
|
|
||||||
void (*freefun) (POINTER, POINTER), POINTER arg)
|
|
||||||
{
|
|
||||||
@@ -235,7 +237,7 @@ _obstack_begin_1 (struct obstack *h, int
|
|
||||||
to the beginning of the new one. */
|
|
||||||
|
|
||||||
void
|
|
||||||
-_obstack_newchunk (struct obstack *h, int length)
|
|
||||||
+_obstack_newchunk (struct obstack *h, PTR_INT_TYPE length)
|
|
||||||
{
|
|
||||||
register struct _obstack_chunk *old_chunk = h->chunk;
|
|
||||||
register struct _obstack_chunk *new_chunk;
|
|
||||||
@@ -388,11 +390,11 @@ obstack_free (struct obstack *h, POINTER
|
|
||||||
abort ();
|
|
||||||
}
|
|
||||||
|
|
||||||
-int
|
|
||||||
+PTR_INT_TYPE
|
|
||||||
_obstack_memory_used (struct obstack *h)
|
|
||||||
{
|
|
||||||
register struct _obstack_chunk* lp;
|
|
||||||
- register int nbytes = 0;
|
|
||||||
+ register PTR_INT_TYPE nbytes = 0;
|
|
||||||
|
|
||||||
for (lp = h->chunk; lp != 0; lp = lp->prev)
|
|
||||||
{
|
|
||||||
@@ -421,6 +423,7 @@ print_and_abort (void)
|
|
||||||
}
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
+/* These functions are now broken for 64-bit obstack! */
|
|
||||||
/* These are now turned off because the applications do not use it
|
|
||||||
and it uses bcopy via obstack_grow, which causes trouble on sysV. */
|
|
||||||
|
|
|
@ -1,158 +0,0 @@
|
||||||
for gdb-6.3/gdb/ChangeLog
|
|
||||||
from Alexandre Oliva <aoliva@redhat.com>
|
|
||||||
|
|
||||||
* i386-linux-nat.c (i386_debug_register_for_thread): New struct.
|
|
||||||
(i386_linux_set_dr_for_thread): Rename from...
|
|
||||||
(i386_linux_set_debug_regs_for_thread): ... this, and
|
|
||||||
add new function to catch exceptions in the old one.
|
|
||||||
|
|
||||||
2008-02-24 Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
||||||
|
|
||||||
Port to GDB-6.8pre.
|
|
||||||
|
|
||||||
This patch was originally made to workaround a deficiency of ia32el (==ia32
|
|
||||||
emulator on ia64) which EIOs on ptrace(2) of the debug registers.
|
|
||||||
|
|
||||||
Currently I can no longer run gdb.i386 on RHEL-5.1.ia64 as it fails on
|
|
||||||
$ rpm -qv kernel
|
|
||||||
kernel-2.6.18-53.el5.ia64
|
|
||||||
$ file /emul/ia32-linux/usr/bin/gdb ./print-threads
|
|
||||||
/emul/ia32-linux/usr/bin/gdb: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.6.9, dynamically linked (uses shared libs), for GNU/Linux 2.6.9, stripped
|
|
||||||
./print-threads: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.6.9, dynamically linked (uses shared libs), for GNU/Linux 2.6.9, not stripped
|
|
||||||
$ /emul/ia32-linux/usr/bin/gdb ./print-threads
|
|
||||||
(gdb) r
|
|
||||||
Starting program: /root/jkratoch/redhat/print-threads
|
|
||||||
Warning:
|
|
||||||
Cannot insert breakpoint -2.
|
|
||||||
Error accessing memory address 0x555766fb: Input/output error.
|
|
||||||
(gdb) maint info breakpoints
|
|
||||||
Num Type Disp Enb Address What
|
|
||||||
-1 longjmp resume keep n 0x00000000
|
|
||||||
-2 shlib events keep y 0x555766fb
|
|
||||||
|
|
||||||
ia32-on-ia64 run problem info:
|
|
||||||
|
|
||||||
the inconsistency is in function linux_nat_wait - there is a variable called
|
|
||||||
block_mask, which is assumed to represent the current signal mask. in the
|
|
||||||
following execution path this assumption does not hold:
|
|
||||||
|
|
||||||
1) block-mask is filled with SIGCHLD and the signal is masked in
|
|
||||||
lin_lwp_attach_lwp, which is called at the beginning of the procedure
|
|
||||||
that handles a new thread in the debuggee.
|
|
||||||
2) further down this procedure gdb tries to set the debug regs of the debuggee.
|
|
||||||
when trying to set debug regs - gdb fails and calls throw_exception. this
|
|
||||||
function finishes with siglongjmp, which clears the sigmask (seq. 1).
|
|
||||||
3) further down, linux_nat_wait is called to wait on the new child. in
|
|
||||||
linux_nat_wait there is a sequence :
|
|
||||||
|
|
||||||
if ( ! (block_mask & SIGCHLD) )
|
|
||||||
mask- SIGCHLD
|
|
||||||
while () {
|
|
||||||
wait-no-hang( )
|
|
||||||
if no child found then
|
|
||||||
sigsuspend (SIGCHLD)
|
|
||||||
|
|
||||||
4) the signal that notifies the debugger about the child is received after the
|
|
||||||
wait and before the sigsuspend. originally, this was not supposed to happen
|
|
||||||
because SIGCHLD is supposed to be blocked, but because what happens in step
|
|
||||||
2, the signal mask is cleared and the signal is received at this point,
|
|
||||||
which results with a hang
|
|
||||||
|
|
||||||
sequence 1:
|
|
||||||
|
|
||||||
catch_errors (symbol_add_stubs)
|
|
||||||
symbol_file_add_with_addrs_or_offsets
|
|
||||||
deprecated_target_new_objfile_hook
|
|
||||||
tui_new_objfile_hook
|
|
||||||
attach_thread
|
|
||||||
observer_notify_linux_new_thread
|
|
||||||
generic_observer_notify
|
|
||||||
observer_linux_new_thread_notification_stub
|
|
||||||
i386_linux_new_thread
|
|
||||||
i386_linux_set_debug_regs_for_thread
|
|
||||||
i386_linux_dr_set_addr
|
|
||||||
i386_linux_dr_set
|
|
||||||
perror_with_name
|
|
||||||
.
|
|
||||||
.
|
|
||||||
.
|
|
||||||
throw_exception
|
|
||||||
siglongjmp
|
|
||||||
|
|
||||||
RHEL Bug 175270
|
|
||||||
|
|
||||||
Index: gdb-6.8cvs20080219/gdb/i386-linux-nat.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.8cvs20080219.orig/gdb/i386-linux-nat.c 2008-01-10 19:19:02.000000000 +0100
|
|
||||||
+++ gdb-6.8cvs20080219/gdb/i386-linux-nat.c 2008-02-24 09:23:09.000000000 +0100
|
|
||||||
@@ -24,6 +24,7 @@
|
|
||||||
#include "regcache.h"
|
|
||||||
#include "target.h"
|
|
||||||
#include "linux-nat.h"
|
|
||||||
+#include "exceptions.h"
|
|
||||||
|
|
||||||
#include "gdb_assert.h"
|
|
||||||
#include "gdb_string.h"
|
|
||||||
@@ -611,20 +612,40 @@ i386_linux_dr_get (ptid_t ptid, int regn
|
|
||||||
return value;
|
|
||||||
}
|
|
||||||
|
|
||||||
-static void
|
|
||||||
-i386_linux_dr_set (ptid_t ptid, int regnum, unsigned long value)
|
|
||||||
-{
|
|
||||||
- int tid;
|
|
||||||
+struct i386_linux_dr_set
|
|
||||||
+ {
|
|
||||||
+ int tid;
|
|
||||||
+ int regnum;
|
|
||||||
+ unsigned long value;
|
|
||||||
+ };
|
|
||||||
|
|
||||||
- tid = TIDGET (ptid);
|
|
||||||
- if (tid == 0)
|
|
||||||
- tid = PIDGET (ptid);
|
|
||||||
+static int
|
|
||||||
+i386_linux_dr_set_core (void *data_pointer)
|
|
||||||
+{
|
|
||||||
+ struct i386_linux_dr_set *data = data_pointer;
|
|
||||||
|
|
||||||
errno = 0;
|
|
||||||
- ptrace (PTRACE_POKEUSER, tid,
|
|
||||||
- offsetof (struct user, u_debugreg[regnum]), value);
|
|
||||||
+ ptrace (PTRACE_POKEUSER, data->tid,
|
|
||||||
+ offsetof (struct user, u_debugreg[data->regnum]), data->value);
|
|
||||||
if (errno != 0)
|
|
||||||
perror_with_name (_("Couldn't write debug register"));
|
|
||||||
+ return 1;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static int
|
|
||||||
+i386_linux_dr_set (ptid_t ptid, int regnum, unsigned long value)
|
|
||||||
+{
|
|
||||||
+ struct i386_linux_dr_set data;
|
|
||||||
+ int tid;
|
|
||||||
+
|
|
||||||
+ data.tid = TIDGET (ptid);
|
|
||||||
+ if (data.tid == 0)
|
|
||||||
+ data.tid = PIDGET (ptid);
|
|
||||||
+
|
|
||||||
+ data.regnum = regnum;
|
|
||||||
+ data.value = value;
|
|
||||||
+
|
|
||||||
+ return catch_errors (i386_linux_dr_set_core, &data, "", RETURN_MASK_ALL);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
Index: gdb-6.8cvs20080219/gdb/Makefile.in
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.8cvs20080219.orig/gdb/Makefile.in 2008-02-24 09:13:35.000000000 +0100
|
|
||||||
+++ gdb-6.8cvs20080219/gdb/Makefile.in 2008-02-24 09:14:26.000000000 +0100
|
|
||||||
@@ -2252,7 +2252,7 @@ i386gnu-tdep.o: i386gnu-tdep.c $(defs_h)
|
|
||||||
i386-linux-nat.o: i386-linux-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) \
|
|
||||||
$(regcache_h) $(linux_nat_h) $(gdb_assert_h) $(gdb_string_h) \
|
|
||||||
$(gregset_h) $(i387_tdep_h) $(i386_tdep_h) $(i386_linux_tdep_h) \
|
|
||||||
- $(gdb_proc_service_h) $(target_h)
|
|
||||||
+ $(gdb_proc_service_h) $(target_h) $(exceptions_h)
|
|
||||||
i386-linux-tdep.o: i386-linux-tdep.c $(defs_h) $(gdbcore_h) $(frame_h) \
|
|
||||||
$(value_h) $(regcache_h) $(inferior_h) $(osabi_h) $(reggroups_h) \
|
|
||||||
$(dwarf2_frame_h) $(gdb_string_h) $(i386_tdep_h) \
|
|
|
@ -1,52 +0,0 @@
|
||||||
2005-01-21 Jeff Johnston <jjohnstn@redhat.com>
|
|
||||||
|
|
||||||
* linespec.c (collect_methods): Don't do special processing for
|
|
||||||
destructors as this will be handled in find_methods.
|
|
||||||
(find_methods): Fix ctor check to also check for dtor.
|
|
||||||
|
|
||||||
2007-10-14 Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
||||||
|
|
||||||
Port to GDB-6.7.
|
|
||||||
|
|
||||||
Index: gdb-6.7/gdb/linespec.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.7.orig/gdb/linespec.c 2007-10-13 05:26:33.000000000 +0200
|
|
||||||
+++ gdb-6.7/gdb/linespec.c 2007-10-14 23:31:03.000000000 +0200
|
|
||||||
@@ -398,12 +398,14 @@ add_matching_methods (int method_counter
|
|
||||||
|
|
||||||
/* Check for special case of looking for member that
|
|
||||||
doesn't have a mangled name provided. This will happen
|
|
||||||
- when we have in-charge and not-in-charge constructors.
|
|
||||||
+ when we have in-charge and not-in-charge ctors/dtors.
|
|
||||||
Since we don't have a mangled name to work with, if we
|
|
||||||
- look for the symbol, we can only find the class itself.
|
|
||||||
+ look for the symbol, we can at best find the class itself.
|
|
||||||
We can find the information we need in the minimal symbol
|
|
||||||
table which has the full member name information we need. */
|
|
||||||
- if (strlen (phys_name) <= strlen (class_name))
|
|
||||||
+ if (strlen (phys_name) <= strlen (class_name)
|
|
||||||
+ || (strlen (phys_name) == strlen (class_name) + 1
|
|
||||||
+ && phys_name[0] == '~'))
|
|
||||||
return add_minsym_members (class_name, phys_name, msym_arr);
|
|
||||||
|
|
||||||
/* Destructor is handled by caller, don't add it to
|
|
||||||
@@ -1731,6 +1733,11 @@ collect_methods (char *copy, struct type
|
|
||||||
{
|
|
||||||
int i1 = 0; /* Counter for the symbol array. */
|
|
||||||
|
|
||||||
+#if 0
|
|
||||||
+ /* Ignore this special method for getting destructors because
|
|
||||||
+ find_methods is more robust and can handle multiple
|
|
||||||
+ destructors which is the case when gcc generates a not-in-charge
|
|
||||||
+ vs an in-charge destructor. */
|
|
||||||
if (destructor_name_p (copy, t))
|
|
||||||
{
|
|
||||||
/* Destructors are a special case. */
|
|
||||||
@@ -1749,6 +1756,7 @@ collect_methods (char *copy, struct type
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
+#endif
|
|
||||||
i1 = find_methods (t, copy, SYMBOL_LANGUAGE (sym_class), sym_arr, msym_arr);
|
|
||||||
|
|
||||||
return i1;
|
|
|
@ -1,24 +0,0 @@
|
||||||
2005-02-01 Jeff Johnston <jjohnstn@redhat.com>
|
|
||||||
|
|
||||||
* dwarf2read.c (die_type): Tolerate a type reference to location
|
|
||||||
<0> and treat as unknown type.
|
|
||||||
|
|
||||||
2008-02-24 Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
||||||
|
|
||||||
Port to GDB-6.8pre.
|
|
||||||
|
|
||||||
Index: gdb-6.8cvs20080219/gdb/dwarf2read.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.8cvs20080219.orig/gdb/dwarf2read.c 2008-02-22 08:10:39.000000000 +0100
|
|
||||||
+++ gdb-6.8cvs20080219/gdb/dwarf2read.c 2008-02-22 08:17:56.000000000 +0100
|
|
||||||
@@ -7634,6 +7634,10 @@ die_type (struct die_info *die, struct d
|
|
||||||
/* A missing DW_AT_type represents a void type. */
|
|
||||||
return builtin_type (current_gdbarch)->builtin_void;
|
|
||||||
}
|
|
||||||
+ else if (DW_ADDR (type_attr) == 0)
|
|
||||||
+ /* If we have an invalid reference to 0, ignore it and treat
|
|
||||||
+ the type as unknown. */
|
|
||||||
+ return builtin_type_error;
|
|
||||||
else
|
|
||||||
type_die = follow_die_ref (die, type_attr, cu);
|
|
||||||
|
|
|
@ -1,6 +1,16 @@
|
||||||
--- /dev/null 2008-03-23 13:41:46.072650180 +0100
|
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||||
+++ gdb-6.3/gdb/testsuite/gdb.base/focus-cmd-prev.exp 2008-03-23 23:46:45.000000000 +0100
|
From: Fedora GDB patches <invalid@email.com>
|
||||||
@@ -0,0 +1,25 @@
|
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||||
|
Subject: gdb-6.3-focus-cmd-prev-test.patch
|
||||||
|
|
||||||
|
;; Test a crash on `focus cmd', `focus prev' commands.
|
||||||
|
;;=fedoratest
|
||||||
|
|
||||||
|
diff --git a/gdb/testsuite/gdb.base/focus-cmd-prev.exp b/gdb/testsuite/gdb.base/focus-cmd-prev.exp
|
||||||
|
new file mode 100644
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/gdb/testsuite/gdb.base/focus-cmd-prev.exp
|
||||||
|
@@ -0,0 +1,40 @@
|
||||||
+# Copyright 2008 Free Software Foundation, Inc.
|
+# Copyright 2008 Free Software Foundation, Inc.
|
||||||
+
|
+
|
||||||
+# This program is free software; you can redistribute it and/or modify
|
+# This program is free software; you can redistribute it and/or modify
|
||||||
|
@ -24,5 +34,20 @@
|
||||||
+gdb_exit
|
+gdb_exit
|
||||||
+gdb_start
|
+gdb_start
|
||||||
+
|
+
|
||||||
+gdb_test "focus cmd"
|
+# Do not use gdb_test or \r\n there since:
|
||||||
+gdb_test "focus prev"
|
+# commit d7e747318f4d04af033f16325f9b6d74f67079ec
|
||||||
|
+# Eliminate make_cleanup_ui_file_delete / make ui_file a class hierarchy
|
||||||
|
+
|
||||||
|
+set test "focus cmd"
|
||||||
|
+gdb_test_multiple $test $test {
|
||||||
|
+ -re "$gdb_prompt $" {
|
||||||
|
+ pass $test
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+set test "focus prev"
|
||||||
|
+gdb_test_multiple $test $test {
|
||||||
|
+ -re "$gdb_prompt $" {
|
||||||
|
+ pass $test
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
|
|
@ -1,31 +0,0 @@
|
||||||
2004-09-27 Andrew Cagney <cagney@gnu.org>
|
|
||||||
|
|
||||||
* frame.c (get_prev_frame): Stop backtrace when a zero PC and
|
|
||||||
successive normal frames.
|
|
||||||
|
|
||||||
Index: ./gdb/frame.c
|
|
||||||
===================================================================
|
|
||||||
RCS file: /cvs/src/src/gdb/frame.c,v
|
|
||||||
retrieving revision 1.191
|
|
||||||
diff -p -u -r1.191 frame.c
|
|
||||||
--- ./gdb/frame.c 1 Sep 2004 14:13:33 -0000 1.191
|
|
||||||
+++ ./gdb/frame.c 28 Sep 2004 02:45:58 -0000
|
|
||||||
@@ -1235,6 +1235,18 @@ get_prev_frame (struct frame_info *this_
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
+ if (this_frame->level > 0
|
|
||||||
+#if 0
|
|
||||||
+ && backtrace_past_zero_pc
|
|
||||||
+#endif
|
|
||||||
+ && get_frame_type (this_frame) == NORMAL_FRAME
|
|
||||||
+ && get_frame_type (get_next_frame (this_frame)) == NORMAL_FRAME
|
|
||||||
+ && get_frame_pc (this_frame) == 0)
|
|
||||||
+ {
|
|
||||||
+ frame_debug_got_null_frame (gdb_stdlog, this_frame, "zero PC");
|
|
||||||
+ return NULL;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
return get_prev_frame_1 (this_frame);
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,25 +0,0 @@
|
||||||
2005-02-07 Jeff Johnston <jjohnstn@redhat.com>
|
|
||||||
|
|
||||||
* linux-nat.c (linux_nat_xfer_memory): Don't use
|
|
||||||
linux_proc_xfer_memory for ia64.
|
|
||||||
|
|
||||||
Index: gdb-6.5/gdb/linux-nat.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.5.orig/gdb/linux-nat.c 2006-07-07 00:57:56.000000000 -0300
|
|
||||||
+++ gdb-6.5/gdb/linux-nat.c 2006-07-07 02:24:51.000000000 -0300
|
|
||||||
@@ -3152,10 +3152,15 @@ linux_xfer_partial (struct target_ops *o
|
|
||||||
return procfs_xfer_auxv (ops, object, annex, readbuf, writebuf,
|
|
||||||
offset, len);
|
|
||||||
|
|
||||||
+#ifndef NATIVE_XFER_UNWIND_TABLE
|
|
||||||
+ /* FIXME: For ia64, we cannot currently use linux_proc_xfer_memory
|
|
||||||
+ for accessing thread storage. Revert when Bugzilla 147436
|
|
||||||
+ is fixed. */
|
|
||||||
xfer = linux_proc_xfer_partial (ops, object, annex, readbuf, writebuf,
|
|
||||||
offset, len);
|
|
||||||
if (xfer != 0)
|
|
||||||
return xfer;
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
return super_xfer_partial (ops, object, annex, readbuf, writebuf,
|
|
||||||
offset, len);
|
|
|
@ -1,26 +1,35 @@
|
||||||
|
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andrew Cagney <cagney@gnu.org>
|
||||||
|
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||||
|
Subject: gdb-6.3-gstack-20050411.patch
|
||||||
|
|
||||||
|
;; Add a wrapper script to GDB that implements pstack using the
|
||||||
|
;; --readnever option.
|
||||||
|
;;=push
|
||||||
|
|
||||||
2004-11-23 Andrew Cagney <cagney@redhat.com>
|
2004-11-23 Andrew Cagney <cagney@redhat.com>
|
||||||
|
|
||||||
* Makefile.in (uninstall-gstack, install-gstack): New rules, add
|
* Makefile.in (uninstall-gstack, install-gstack): New rules, add
|
||||||
to install and uninstall.
|
to install and uninstall.
|
||||||
* gstack.sh, gstack.1: New files.
|
* gstack.sh, gstack.1: New files.
|
||||||
|
|
||||||
Index: gdb-6.8/gdb/Makefile.in
|
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
|
||||||
===================================================================
|
--- a/gdb/Makefile.in
|
||||||
--- gdb-6.8.orig/gdb/Makefile.in 2008-03-17 13:15:08.000000000 +0100
|
+++ b/gdb/Makefile.in
|
||||||
+++ gdb-6.8/gdb/Makefile.in 2008-07-14 10:25:47.000000000 +0200
|
@@ -1726,7 +1726,7 @@ info install-info clean-info dvi pdf install-pdf html install-html: force
|
||||||
@@ -1161,7 +1161,7 @@ gdb.z:gdb.1
|
install: all
|
||||||
# time it takes for make to check that all is up to date.
|
@$(MAKE) $(FLAGS_TO_PASS) install-only
|
||||||
# install-only is intended to address that need.
|
|
||||||
install: all install-only
|
|
||||||
-install-only: $(CONFIG_INSTALL)
|
-install-only: $(CONFIG_INSTALL)
|
||||||
+install-only: install-gstack $(CONFIG_INSTALL)
|
+install-only: install-gstack $(CONFIG_INSTALL)
|
||||||
transformed_name=`t='$(program_transform_name)'; \
|
transformed_name=`t='$(program_transform_name)'; \
|
||||||
echo gdb | sed -e "$$t"` ; \
|
echo gdb | sed -e "$$t"` ; \
|
||||||
if test "x$$transformed_name" = x; then \
|
if test "x$$transformed_name" = x; then \
|
||||||
@@ -1193,9 +1193,26 @@ install-tui:
|
@@ -1775,7 +1775,25 @@ install-guile:
|
||||||
$(DESTDIR)$(man1dir) ; \
|
install-python:
|
||||||
$(INSTALL_DATA) $(srcdir)/gdb.1 \
|
$(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(GDB_DATADIR)/python/gdb
|
||||||
$(DESTDIR)$(man1dir)/$$transformed_name.1
|
|
||||||
|
-uninstall: force $(CONFIG_UNINSTALL)
|
||||||
+GSTACK=gstack
|
+GSTACK=gstack
|
||||||
+.PHONY: install-gstack
|
+.PHONY: install-gstack
|
||||||
+install-gstack:
|
+install-gstack:
|
||||||
|
@ -38,17 +47,15 @@ Index: gdb-6.8/gdb/Makefile.in
|
||||||
+ $(DESTDIR)$(man1dir) ; \
|
+ $(DESTDIR)$(man1dir) ; \
|
||||||
+ : $(INSTALL_DATA) $(srcdir)/gstack.1 \
|
+ : $(INSTALL_DATA) $(srcdir)/gstack.1 \
|
||||||
+ $(DESTDIR)$(man1dir)/$$transformed_name.1
|
+ $(DESTDIR)$(man1dir)/$$transformed_name.1
|
||||||
|
+
|
||||||
|
|
||||||
-uninstall: force $(CONFIG_UNINSTALL)
|
|
||||||
+uninstall: force uninstall-gstack $(CONFIG_UNINSTALL)
|
+uninstall: force uninstall-gstack $(CONFIG_UNINSTALL)
|
||||||
transformed_name=`t='$(program_transform_name)'; \
|
transformed_name=`t='$(program_transform_name)'; \
|
||||||
echo gdb | sed -e $$t` ; \
|
echo gdb | sed -e $$t` ; \
|
||||||
if test "x$$transformed_name" = x; then \
|
if test "x$$transformed_name" = x; then \
|
||||||
@@ -1217,6 +1234,17 @@ uninstall-tui:
|
@@ -1798,6 +1816,18 @@ uninstall: force $(CONFIG_UNINSTALL)
|
||||||
fi ; \
|
fi
|
||||||
rm -f $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) \
|
@$(MAKE) DO=uninstall "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do
|
||||||
$(DESTDIR)$(man1dir)/$$transformed_name.1
|
|
||||||
+.PHONY: uninstall-gstack
|
+.PHONY: uninstall-gstack
|
||||||
+uninstall-gstack:
|
+uninstall-gstack:
|
||||||
+ transformed_name=`t='$(program_transform_name)'; \
|
+ transformed_name=`t='$(program_transform_name)'; \
|
||||||
|
@ -60,14 +67,15 @@ Index: gdb-6.8/gdb/Makefile.in
|
||||||
+ fi ; \
|
+ fi ; \
|
||||||
+ rm -f $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) \
|
+ rm -f $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) \
|
||||||
+ $(DESTDIR)$(man1dir)/$$transformed_name.1
|
+ $(DESTDIR)$(man1dir)/$$transformed_name.1
|
||||||
|
+
|
||||||
# The C++ name parser can be built standalone for testing.
|
# The C++ name parser can be built standalone for testing.
|
||||||
test-cp-name-parser.o: cp-name-parser.c $(safe_ctype_h) $(libiberty_h) \
|
test-cp-name-parser.o: cp-name-parser.c
|
||||||
Index: gdb-6.8/gdb/gstack.sh
|
$(COMPILE) -DTEST_CPNAMES cp-name-parser.c
|
||||||
===================================================================
|
diff --git a/gdb/gstack.sh b/gdb/gstack.sh
|
||||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
new file mode 100644
|
||||||
+++ gdb-6.8/gdb/gstack.sh 2008-07-14 10:25:47.000000000 +0200
|
--- /dev/null
|
||||||
@@ -0,0 +1,45 @@
|
+++ b/gdb/gstack.sh
|
||||||
|
@@ -0,0 +1,43 @@
|
||||||
+#!/bin/sh
|
+#!/bin/sh
|
||||||
+
|
+
|
||||||
+if test $# -ne 1; then
|
+if test $# -ne 1; then
|
||||||
|
@ -87,29 +95,164 @@ Index: gdb-6.8/gdb/gstack.sh
|
||||||
+backtrace="bt"
|
+backtrace="bt"
|
||||||
+if test -d /proc/$1/task ; then
|
+if test -d /proc/$1/task ; then
|
||||||
+ # Newer kernel; has a task/ directory.
|
+ # Newer kernel; has a task/ directory.
|
||||||
+ if test `ls /proc/$1/task | wc -l` -gt 1 2>/dev/null ; then
|
+ if test `/bin/ls /proc/$1/task | /usr/bin/wc -l` -gt 1 2>/dev/null ; then
|
||||||
+ backtrace="thread apply all bt"
|
+ backtrace="thread apply all bt"
|
||||||
+ fi
|
+ fi
|
||||||
+elif test -f /proc/$1/maps ; then
|
+elif test -f /proc/$1/maps ; then
|
||||||
+ # Older kernel; go by it loading libpthread.
|
+ # Older kernel; go by it loading libpthread.
|
||||||
+ if grep -e libpthread /proc/$1/maps > /dev/null 2>&1 ; then
|
+ if /bin/grep -e libpthread /proc/$1/maps > /dev/null 2>&1 ; then
|
||||||
+ backtrace="thread apply all bt"
|
+ backtrace="thread apply all bt"
|
||||||
+ fi
|
+ fi
|
||||||
+fi
|
+fi
|
||||||
+
|
+
|
||||||
+GDB=${GDB:-gdb}
|
+GDB=${GDB:-gdb}
|
||||||
+
|
+
|
||||||
+if $GDB -nx --quiet --batch --readnever > /dev/null 2>&1; then
|
|
||||||
+ readnever=--readnever
|
|
||||||
+else
|
|
||||||
+ readnever=
|
|
||||||
+fi
|
|
||||||
+
|
|
||||||
+# Run GDB, strip out unwanted noise.
|
+# Run GDB, strip out unwanted noise.
|
||||||
+$GDB --quiet $readnever -nx /proc/$1/exe $1 <<EOF 2>&1 |
|
+# --readnever is no longer used since .gdb_index is now in use.
|
||||||
|
+$GDB --quiet -nx $GDBARGS /proc/$1/exe $1 <<EOF 2>&1 |
|
||||||
|
+set width 0
|
||||||
|
+set height 0
|
||||||
|
+set pagination no
|
||||||
+$backtrace
|
+$backtrace
|
||||||
+EOF
|
+EOF
|
||||||
+sed -n \
|
+/bin/sed -n \
|
||||||
+ -e 's/^(gdb) //' \
|
+ -e 's/^\((gdb) \)*//' \
|
||||||
+ -e '/^#/p' \
|
+ -e '/^#/p' \
|
||||||
+ -e '/^Thread/p'
|
+ -e '/^Thread/p'
|
||||||
|
diff --git a/gdb/testsuite/gdb.base/gstack.c b/gdb/testsuite/gdb.base/gstack.c
|
||||||
|
new file mode 100644
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/gdb/testsuite/gdb.base/gstack.c
|
||||||
|
@@ -0,0 +1,43 @@
|
||||||
|
+/* This testcase is part of GDB, the GNU debugger.
|
||||||
|
+
|
||||||
|
+ Copyright 2005, 2007, 2008, 2009 Free Software Foundation, Inc.
|
||||||
|
+
|
||||||
|
+ This program is free software; you can redistribute it and/or modify
|
||||||
|
+ it under the terms of the GNU General Public License as published by
|
||||||
|
+ the Free Software Foundation; either version 3 of the License, or
|
||||||
|
+ (at your option) any later version.
|
||||||
|
+
|
||||||
|
+ This program is distributed in the hope that it will be useful,
|
||||||
|
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
+ GNU General Public License for more details.
|
||||||
|
+
|
||||||
|
+ You should have received a copy of the GNU General Public License
|
||||||
|
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
|
+
|
||||||
|
+#include <stdio.h>
|
||||||
|
+#include <unistd.h>
|
||||||
|
+#include <string.h>
|
||||||
|
+
|
||||||
|
+void
|
||||||
|
+func (void)
|
||||||
|
+{
|
||||||
|
+ const char msg[] = "looping\n";
|
||||||
|
+
|
||||||
|
+ /* Use the most simple notification not to get caught by attach on exiting
|
||||||
|
+ the function. */
|
||||||
|
+ write (1, msg, strlen (msg));
|
||||||
|
+
|
||||||
|
+ for (;;);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+int
|
||||||
|
+main (void)
|
||||||
|
+{
|
||||||
|
+ alarm (60);
|
||||||
|
+ nice (100);
|
||||||
|
+
|
||||||
|
+ func ();
|
||||||
|
+
|
||||||
|
+ return 0;
|
||||||
|
+}
|
||||||
|
diff --git a/gdb/testsuite/gdb.base/gstack.exp b/gdb/testsuite/gdb.base/gstack.exp
|
||||||
|
new file mode 100644
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/gdb/testsuite/gdb.base/gstack.exp
|
||||||
|
@@ -0,0 +1,84 @@
|
||||||
|
+# Copyright (C) 2012 Free Software Foundation, Inc.
|
||||||
|
+
|
||||||
|
+# This program is free software; you can redistribute it and/or modify
|
||||||
|
+# it under the terms of the GNU General Public License as published by
|
||||||
|
+# the Free Software Foundation; either version 3 of the License, or
|
||||||
|
+# (at your option) any later version.
|
||||||
|
+#
|
||||||
|
+# This program is distributed in the hope that it will be useful,
|
||||||
|
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
+# GNU General Public License for more details.
|
||||||
|
+#
|
||||||
|
+# You should have received a copy of the GNU General Public License
|
||||||
|
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
+
|
||||||
|
+set testfile gstack
|
||||||
|
+set executable ${testfile}
|
||||||
|
+set binfile [standard_output_file $executable]
|
||||||
|
+if {[build_executable ${testfile} ${executable} "" {debug}] == -1} {
|
||||||
|
+ return -1
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+set test "spawn inferior"
|
||||||
|
+set command "${binfile}"
|
||||||
|
+set res [remote_spawn host $command];
|
||||||
|
+if { $res < 0 || $res == "" } {
|
||||||
|
+ perror "Spawning $command failed."
|
||||||
|
+ fail $test
|
||||||
|
+ return
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+# The spawn id of the test inferior.
|
||||||
|
+set test_spawn_id $res
|
||||||
|
+
|
||||||
|
+set use_gdb_stub 1
|
||||||
|
+set pid [exp_pid -i $res]
|
||||||
|
+gdb_expect {
|
||||||
|
+ -re "looping\r\n" {
|
||||||
|
+ pass $test
|
||||||
|
+ }
|
||||||
|
+ eof {
|
||||||
|
+ fail "$test (eof)"
|
||||||
|
+ return
|
||||||
|
+ }
|
||||||
|
+ timeout {
|
||||||
|
+ fail "$test (timeout)"
|
||||||
|
+ return
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+# Testcase uses the most simple notification not to get caught by attach on
|
||||||
|
+# exiting the function. Still we could retry the gstack command if we fail.
|
||||||
|
+
|
||||||
|
+set test "spawn gstack"
|
||||||
|
+set command "sh -c GDB=$GDB\\ GDBARGS=-data-directory\\\\\\ $BUILD_DATA_DIRECTORY\\ sh\\ ${srcdir}/../gstack.sh\\ $pid\\;echo\\ GSTACK-END"
|
||||||
|
+set res [remote_spawn host $command];
|
||||||
|
+if { $res < 0 || $res == "" } {
|
||||||
|
+ perror "Spawning $command failed."
|
||||||
|
+ fail $test
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+set gdb_spawn_id $res
|
||||||
|
+
|
||||||
|
+gdb_test_multiple "" $test {
|
||||||
|
+ -re "^#0 +(0x\[0-9a-f\]+ in )?\\.?func \\(\\) at \[^\r\n\]*\r\n#1 +0x\[0-9a-f\]+ in \\.?main \\(\\) at \[^\r\n\]*\r\nGSTACK-END\r\n\$" {
|
||||||
|
+ pass $test
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+gdb_test_multiple "" "gstack exits" {
|
||||||
|
+ eof {
|
||||||
|
+ set result [wait -i $gdb_spawn_id]
|
||||||
|
+ verbose $result
|
||||||
|
+
|
||||||
|
+ gdb_assert { [lindex $result 2] == 0 } "gstack exits with no error"
|
||||||
|
+ gdb_assert { [lindex $result 3] == 0 } "gstack's exit status is 0"
|
||||||
|
+
|
||||||
|
+ remote_close host
|
||||||
|
+ clear_gdb_spawn_id
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+# Kill the test inferior.
|
||||||
|
+kill_wait_spawned_process $test_spawn_id
|
||||||
|
|
|
@ -1,34 +0,0 @@
|
||||||
Index: gdb-6.3/gdb/gstack.sh
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.3.orig/gdb/gstack.sh 2006-02-14 17:21:05.000000000 -0200
|
|
||||||
+++ gdb-6.3/gdb/gstack.sh 2006-04-14 03:17:12.000000000 -0300
|
|
||||||
@@ -17,17 +17,17 @@ fi
|
|
||||||
backtrace="bt"
|
|
||||||
if test -d /proc/$1/task ; then
|
|
||||||
# Newer kernel; has a task/ directory.
|
|
||||||
- if test `ls /proc/$1/task | wc -l` -gt 1 2>/dev/null ; then
|
|
||||||
+ if test `/bin/ls /proc/$1/task | /usr/bin/wc -l` -gt 1 2>/dev/null ; then
|
|
||||||
backtrace="thread apply all bt"
|
|
||||||
fi
|
|
||||||
elif test -f /proc/$1/maps ; then
|
|
||||||
# Older kernel; go by it loading libpthread.
|
|
||||||
- if grep -e libpthread /proc/$1/maps > /dev/null 2>&1 ; then
|
|
||||||
+ if /bin/grep -e libpthread /proc/$1/maps > /dev/null 2>&1 ; then
|
|
||||||
backtrace="thread apply all bt"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
-GDB=${GDB:-gdb}
|
|
||||||
+GDB=${GDB:-/usr/bin/gdb}
|
|
||||||
|
|
||||||
if $GDB -nx --quiet --batch --readnever > /dev/null 2>&1; then
|
|
||||||
readnever=--readnever
|
|
||||||
@@ -39,7 +39,7 @@ fi
|
|
||||||
$GDB --quiet $readnever -nx /proc/$1/exe $1 <<EOF 2>&1 |
|
|
||||||
$backtrace
|
|
||||||
EOF
|
|
||||||
-sed -n \
|
|
||||||
+/bin/sed -n \
|
|
||||||
-e 's/^(gdb) //' \
|
|
||||||
-e '/^#/p' \
|
|
||||||
-e '/^Thread/p'
|
|
|
@ -1,33 +0,0 @@
|
||||||
Index: gdb-6.3/gdb/linux-nat.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.3.orig/gdb/linux-nat.c 2006-06-15 07:27:02.000000000 -0300
|
|
||||||
+++ gdb-6.3/gdb/linux-nat.c 2006-06-15 07:27:06.000000000 -0300
|
|
||||||
@@ -157,12 +157,28 @@ static int
|
|
||||||
my_waitpid (int pid, int *status, int flags)
|
|
||||||
{
|
|
||||||
int ret;
|
|
||||||
+ int old_status = status ? *status : 0;
|
|
||||||
+
|
|
||||||
do
|
|
||||||
{
|
|
||||||
ret = waitpid (pid, status, flags);
|
|
||||||
}
|
|
||||||
while (ret == -1 && errno == EINTR);
|
|
||||||
|
|
||||||
+ if (ret == 0 && status != 0)
|
|
||||||
+ {
|
|
||||||
+ /* waitpid() running within ia32el (on multi-threaded processes
|
|
||||||
+ only?) modifies status even when it returns zero, and this
|
|
||||||
+ breaks the assumption in linux_nat_wait(), and perhaps
|
|
||||||
+ elsewhere, that it remains unchanged in this case. We
|
|
||||||
+ restore the old value before returning zero, such that the
|
|
||||||
+ assumption holds. */
|
|
||||||
+ if (*status != 0 && *status != old_status)
|
|
||||||
+ warning ("waitpid: non-zero status %x for zero return value",
|
|
||||||
+ *status);
|
|
||||||
+ *status = old_status;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,28 +0,0 @@
|
||||||
2005-01-25 Jeff Johnston <jjohnstn@redhat.com>
|
|
||||||
|
|
||||||
* ia64-tdep.c (getunwind_table): Call the low-level xfer
|
|
||||||
unwind table syscall to support backtracing from syscalls in
|
|
||||||
a corefile.
|
|
||||||
|
|
||||||
Index: gdb-6.5/gdb/ia64-tdep.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.5.orig/gdb/ia64-tdep.c 2006-04-18 16:20:06.000000000 -0300
|
|
||||||
+++ gdb-6.5/gdb/ia64-tdep.c 2006-07-07 02:18:40.000000000 -0300
|
|
||||||
@@ -2470,8 +2470,17 @@ getunwind_table (void *buf, size_t len)
|
|
||||||
we want to preserve fall back to the running kernel's table, then
|
|
||||||
we should find a way to override the corefile layer's
|
|
||||||
xfer_partial method. */
|
|
||||||
+#if 0
|
|
||||||
x = target_read_partial (¤t_target, TARGET_OBJECT_UNWIND_TABLE, NULL,
|
|
||||||
buf, 0, len);
|
|
||||||
+#endif
|
|
||||||
+ /* FIXME: This is a temporary solution to backtracing syscalls in corefiles.
|
|
||||||
+ To do this properly, the AUXV section should be used. This
|
|
||||||
+ fix will work as long as the kernel used to generate the corefile
|
|
||||||
+ is equivalent to the kernel used to debug the corefile. */
|
|
||||||
+ x = ia64_linux_xfer_unwind_table (¤t_target,
|
|
||||||
+ TARGET_OBJECT_UNWIND_TABLE, NULL,
|
|
||||||
+ buf, NULL, 0, len);
|
|
||||||
|
|
||||||
return (int)x;
|
|
||||||
}
|
|
|
@ -1,20 +0,0 @@
|
||||||
Index: gdb-6.6/gdb/gcore.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.6.orig/gdb/gcore.c
|
|
||||||
+++ gdb-6.6/gdb/gcore.c
|
|
||||||
@@ -475,8 +475,14 @@ gcore_copy_callback (bfd *obfd, asection
|
|
||||||
if (size > total_size)
|
|
||||||
size = total_size;
|
|
||||||
|
|
||||||
+ /* Warn if read error occurs except if we were trying to read the
|
|
||||||
+ first page for ia64. The first page is marked readable, but it cannot
|
|
||||||
+ be read. */
|
|
||||||
if (target_read_memory (bfd_section_vma (obfd, osec) + offset,
|
|
||||||
- memhunk, size) != 0)
|
|
||||||
+ memhunk, size) != 0
|
|
||||||
+ && (strcmp (gdbarch_bfd_arch_info (current_gdbarch)->arch_name,
|
|
||||||
+ "ia64")
|
|
||||||
+ || bfd_section_vma (obfd, osec) != 0))
|
|
||||||
{
|
|
||||||
warning (_("Memory read failed for corefile section, %s bytes at 0x%s."),
|
|
||||||
paddr_d (size), paddr (bfd_section_vma (obfd, osec)));
|
|
|
@ -1,133 +0,0 @@
|
||||||
2005-07-14 Jeff Johnsotn <jjohnstn@redhat.com>
|
|
||||||
|
|
||||||
* linux-nat.c (linux_nat_xfer_memory): Incorporate Fujitsu
|
|
||||||
work-around to use /proc/mem for storage, but to fall-back
|
|
||||||
to PTRACE for ia64 rse register areas.
|
|
||||||
* ia64-linux-nat.c (ia64_rse_slot_num): New static function.
|
|
||||||
(ia64_rse_skip_regs): Ditto.
|
|
||||||
(ia64_linux_check_stack_region): New function.
|
|
||||||
|
|
||||||
Index: gdb-6.5/gdb/linux-nat.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.5.orig/gdb/linux-nat.c 2006-07-07 02:29:12.000000000 -0300
|
|
||||||
+++ gdb-6.5/gdb/linux-nat.c 2006-07-07 03:03:55.000000000 -0300
|
|
||||||
@@ -2473,7 +2473,9 @@ linux_nat_xfer_partial (struct target_op
|
|
||||||
do_cleanups (old_chain);
|
|
||||||
return xfer;
|
|
||||||
}
|
|
||||||
-
|
|
||||||
+#ifdef NATIVE_XFER_UNWIND_TABLE
|
|
||||||
+extern int ia64_linux_check_stack_region(struct lwp_info *lwp, void *range);
|
|
||||||
+#endif
|
|
||||||
static int
|
|
||||||
linux_nat_thread_alive (ptid_t ptid)
|
|
||||||
{
|
|
||||||
@@ -3214,15 +3216,34 @@ linux_xfer_partial (struct target_ops *o
|
|
||||||
return procfs_xfer_auxv (ops, object, annex, readbuf, writebuf,
|
|
||||||
offset, len);
|
|
||||||
|
|
||||||
-#ifndef NATIVE_XFER_UNWIND_TABLE
|
|
||||||
- /* FIXME: For ia64, we cannot currently use linux_proc_xfer_memory
|
|
||||||
- for accessing thread storage. Revert when Bugzilla 147436
|
|
||||||
- is fixed. */
|
|
||||||
xfer = linux_proc_xfer_partial (ops, object, annex, readbuf, writebuf,
|
|
||||||
offset, len);
|
|
||||||
if (xfer != 0)
|
|
||||||
- return xfer;
|
|
||||||
+ {
|
|
||||||
+#ifdef NATIVE_XFER_UNWIND_TABLE
|
|
||||||
+ struct mem_region range;
|
|
||||||
+ range.lo = memaddr;
|
|
||||||
+ range.hi = memaddr + len;
|
|
||||||
+
|
|
||||||
+ /* FIXME: For ia64, we cannot currently use
|
|
||||||
+ linux_proc_xfer_partial for accessing rse register storage.
|
|
||||||
+ Revert when Bugzilla 147436 is fixed. */
|
|
||||||
+ if (iterate_over_lwps (ia64_linux_check_stack_region, &range) != NULL)
|
|
||||||
+ { /* This region contains ia64 rse registers, we have to re-read. */
|
|
||||||
+ int xxfer;
|
|
||||||
+
|
|
||||||
+ /* Re-read register stack area. */
|
|
||||||
+ xxfer = super_xfer_partial (ops, object, annex,
|
|
||||||
+ readbuf + (range.lo - memaddr),
|
|
||||||
+ writebuf + (range.lo - memaddr),
|
|
||||||
+ offset + (range.lo - memaddr),
|
|
||||||
+ range.hi - range.lo);
|
|
||||||
+ if (xxfer == 0)
|
|
||||||
+ xfer = 0;
|
|
||||||
+ }
|
|
||||||
#endif
|
|
||||||
+ return xfer;
|
|
||||||
+ }
|
|
||||||
|
|
||||||
return super_xfer_partial (ops, object, annex, readbuf, writebuf,
|
|
||||||
offset, len);
|
|
||||||
Index: gdb-6.5/gdb/ia64-linux-nat.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.5.orig/gdb/ia64-linux-nat.c 2006-03-24 20:08:16.000000000 -0300
|
|
||||||
+++ gdb-6.5/gdb/ia64-linux-nat.c 2006-07-07 02:52:25.000000000 -0300
|
|
||||||
@@ -687,6 +687,64 @@ ia64_linux_xfer_partial (struct target_o
|
|
||||||
|
|
||||||
void _initialize_ia64_linux_nat (void);
|
|
||||||
|
|
||||||
+/*
|
|
||||||
+ * Note: taken from ia64_tdep.c
|
|
||||||
+ *
|
|
||||||
+ */
|
|
||||||
+
|
|
||||||
+static __inline__ unsigned long
|
|
||||||
+ia64_rse_slot_num (unsigned long addr)
|
|
||||||
+{
|
|
||||||
+ return (addr >> 3) & 0x3f;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+/* Skip over a designated number of registers in the backing
|
|
||||||
+ store, remembering every 64th position is for NAT. */
|
|
||||||
+static __inline__ unsigned long
|
|
||||||
+ia64_rse_skip_regs (unsigned long addr, long num_regs)
|
|
||||||
+{
|
|
||||||
+ long delta = ia64_rse_slot_num(addr) + num_regs;
|
|
||||||
+
|
|
||||||
+ if (num_regs < 0)
|
|
||||||
+ delta -= 0x3e;
|
|
||||||
+ return addr + ((num_regs + delta/0x3f) << 3);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+/*
|
|
||||||
+ * Check mem_region is stack or not. If stack, /proc/<pid>/mem cannot return
|
|
||||||
+ * expected value.
|
|
||||||
+ */
|
|
||||||
+int ia64_linux_check_stack_region(struct lwp_info *ti, struct mem_region *range)
|
|
||||||
+{
|
|
||||||
+ CORE_ADDR addr;
|
|
||||||
+ int error;
|
|
||||||
+ unsigned long bsp, cfm, bspstore;
|
|
||||||
+ long sof;
|
|
||||||
+ pid_t pid = ptid_get_lwp(ti->ptid);
|
|
||||||
+ bsp = ptrace(PTRACE_PEEKUSER, pid, PT_AR_BSP ,NULL);
|
|
||||||
+ if (bsp == (unsigned long)-1) {
|
|
||||||
+ return 1;
|
|
||||||
+ }
|
|
||||||
+ /* stack is allocated by one-segment, not separated into several segments.
|
|
||||||
+ So, we only have to check whether bsp is in *range* or not. */
|
|
||||||
+ if((range->lo <= bsp) && (bsp <= range->hi)) {
|
|
||||||
+ bspstore = ptrace(PTRACE_PEEKUSER, pid, PT_AR_BSPSTORE, NULL);
|
|
||||||
+ cfm = ptrace(PTRACE_PEEKUSER, pid, PT_CFM, NULL);
|
|
||||||
+ sof = cfm & 0x3f;
|
|
||||||
+ bsp = ia64_rse_skip_regs(bsp, -sof);
|
|
||||||
+ range->lo = bspstore;
|
|
||||||
+ range->hi = bsp;
|
|
||||||
+ /* we have to check the size of dirty register stack area */
|
|
||||||
+ /*
|
|
||||||
+ fprintf_unfiltered(gdb_stdlog, "<%d> <%p> <%lx> <%p> <%p>\n",
|
|
||||||
+ pid, bsp, sof, range->lo, range->hi);
|
|
||||||
+ */
|
|
||||||
+ return 1;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ return 0;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
void
|
|
||||||
_initialize_ia64_linux_nat (void)
|
|
||||||
{
|
|
|
@ -1,110 +0,0 @@
|
||||||
2005-07-25 Jeff Johnstno <jjohnstn@redhat.com>
|
|
||||||
|
|
||||||
* libunwind-frame.c (libunwind_frame_prev_register): Check valuep
|
|
||||||
is not NULL before copying cursor address into it.
|
|
||||||
|
|
||||||
testsuite:
|
|
||||||
2005-07-25 Jeff Johnstno <jjohnstn@redhat.com>
|
|
||||||
|
|
||||||
* gdb.arch/ia64-sigtramp.exp: New test.
|
|
||||||
* gdb.arch/ia64-sigtramp.c: Ditto.
|
|
||||||
|
|
||||||
2008-02-24 Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
||||||
|
|
||||||
Port to GDB-6.8pre. (Only the testcase has remained.)
|
|
||||||
|
|
||||||
--- gdb-6.3/gdb/testsuite/gdb.arch/ia64-sigtramp.c.fix 2005-07-25 16:42:46.000000000 -0400
|
|
||||||
+++ gdb-6.3/gdb/testsuite/gdb.arch/ia64-sigtramp.c 2005-07-25 16:42:08.000000000 -0400
|
|
||||||
@@ -0,0 +1,23 @@
|
|
||||||
+#include <stdio.h>
|
|
||||||
+#include <signal.h>
|
|
||||||
+
|
|
||||||
+int *l;
|
|
||||||
+
|
|
||||||
+void x (int sig)
|
|
||||||
+{
|
|
||||||
+ printf ("in signal handler for signal %d\n", sig);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+int main()
|
|
||||||
+{
|
|
||||||
+ int k;
|
|
||||||
+
|
|
||||||
+ signal (SIGSEGV, &x);
|
|
||||||
+
|
|
||||||
+ k = *l;
|
|
||||||
+
|
|
||||||
+ printf ("k is %d\n", k);
|
|
||||||
+
|
|
||||||
+ return 0;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
--- gdb-6.3/gdb/testsuite/gdb.arch/ia64-sigtramp.exp.fix 2005-07-25 16:42:50.000000000 -0400
|
|
||||||
+++ gdb-6.3/gdb/testsuite/gdb.arch/ia64-sigtramp.exp 2005-07-25 16:42:01.000000000 -0400
|
|
||||||
@@ -0,0 +1,66 @@
|
|
||||||
+# Copyright 2005 Free Software Foundation, Inc.
|
|
||||||
+
|
|
||||||
+# This program is free software; you can redistribute it and/or modify
|
|
||||||
+# it under the terms of the GNU General Public License as published by
|
|
||||||
+# the Free Software Foundation; either version 2 of the License, or
|
|
||||||
+# (at your option) any later version.
|
|
||||||
+#
|
|
||||||
+# This program is distributed in the hope that it will be useful,
|
|
||||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
+# GNU General Public License for more details.
|
|
||||||
+#
|
|
||||||
+# You should have received a copy of the GNU General Public License
|
|
||||||
+# along with this program; if not, write to the Free Software
|
|
||||||
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
+
|
|
||||||
+# Please email any bugs, comments, and/or additions to this file to:
|
|
||||||
+# bug-gdb@prep.ai.mit.edu
|
|
||||||
+
|
|
||||||
+# This file was written by Jeff Johnston (jjohnstn@redhat.com)
|
|
||||||
+
|
|
||||||
+if $tracelevel then {
|
|
||||||
+ strace $tracelevel
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+#
|
|
||||||
+# test running programs
|
|
||||||
+#
|
|
||||||
+set prms_id 0
|
|
||||||
+set bug_id 0
|
|
||||||
+
|
|
||||||
+if ![istarget "ia64-*-*"] then {
|
|
||||||
+ return
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+set testfile "ia64-sigtramp"
|
|
||||||
+set srcfile ${testfile}.c
|
|
||||||
+set binfile ${objdir}/${subdir}/${testfile}
|
|
||||||
+
|
|
||||||
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-w}] != "" } {
|
|
||||||
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+if [get_compiler_info ${binfile}] {
|
|
||||||
+ return -1
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+gdb_exit
|
|
||||||
+gdb_start
|
|
||||||
+gdb_reinitialize_dir $srcdir/$subdir
|
|
||||||
+gdb_load ${binfile}
|
|
||||||
+
|
|
||||||
+if ![runto_main] then {
|
|
||||||
+ fail "Can't run to main"
|
|
||||||
+ return 0
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+gdb_test "handle SIGSEGV" "SIGSEGV.*Yes.*Yes.*Yes.*Segmentation fault"
|
|
||||||
+gdb_test "next" "" "first next"
|
|
||||||
+gdb_test "next" "Program received signal SIGSEGV.*" "getting SIGSEGV"
|
|
||||||
+gdb_breakpoint "x"
|
|
||||||
+gdb_test "continue" "Breakpoint.*x.*" "continue to x"
|
|
||||||
+
|
|
||||||
+gdb_test "f 1" ".*signal handler called.*" "frame 1"
|
|
||||||
+gdb_test "info frame" "Stack level 1.*p63 at .*" "info sigtramp frame"
|
|
||||||
+
|
|
|
@ -1,116 +0,0 @@
|
||||||
2005-11-15 Jeff Johnston <jjohnstn@redhat.com>
|
|
||||||
|
|
||||||
* linux-thread-db.c (thread_db_wait): Don't bother continuing if
|
|
||||||
the wait result indicates the program terminated with a signal.
|
|
||||||
* linux-nat.c (linux_nat_wait): For SIGILL and SIGTRAP, don't
|
|
||||||
throw away the event if the user has specified nostop noprint.
|
|
||||||
|
|
||||||
gdb/testsuite:
|
|
||||||
|
|
||||||
2005-11-15 Jeff Johnston <jjohnstn@redhat.com>
|
|
||||||
|
|
||||||
* gdb.arch/ia64-sigill.c: New test.
|
|
||||||
* gdb.arch/ia64-sigill.exp: Ditto.
|
|
||||||
|
|
||||||
Index: gdb-6.6/gdb/testsuite/gdb.arch/ia64-sigill.exp
|
|
||||||
===================================================================
|
|
||||||
--- /dev/null
|
|
||||||
+++ gdb-6.6/gdb/testsuite/gdb.arch/ia64-sigill.exp
|
|
||||||
@@ -0,0 +1,59 @@
|
|
||||||
+# Copyright 2005 Free Software Foundation, Inc.
|
|
||||||
+
|
|
||||||
+# This program is free software; you can redistribute it and/or modify
|
|
||||||
+# it under the terms of the GNU General Public License as published by
|
|
||||||
+# the Free Software Foundation; either version 2 of the License, or
|
|
||||||
+# (at your option) any later version.
|
|
||||||
+#
|
|
||||||
+# This program is distributed in the hope that it will be useful,
|
|
||||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
+# GNU General Public License for more details.
|
|
||||||
+#
|
|
||||||
+# You should have received a copy of the GNU General Public License
|
|
||||||
+# along with this program; if not, write to the Free Software
|
|
||||||
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
+
|
|
||||||
+# Please email any bugs, comments, and/or additions to this file to:
|
|
||||||
+# bug-gdb@prep.ai.mit.edu
|
|
||||||
+
|
|
||||||
+# This file was written by Jeff Johnston (jjohnstn@redhat.com)
|
|
||||||
+
|
|
||||||
+if $tracelevel then {
|
|
||||||
+ strace $tracelevel
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+#
|
|
||||||
+# test running programs
|
|
||||||
+#
|
|
||||||
+set prms_id 0
|
|
||||||
+set bug_id 0
|
|
||||||
+
|
|
||||||
+if ![istarget "ia64-*-*"] then {
|
|
||||||
+ return
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+set testfile "ia64-sigill"
|
|
||||||
+set srcfile ${testfile}.c
|
|
||||||
+set binfile ${objdir}/${subdir}/${testfile}
|
|
||||||
+
|
|
||||||
+# Deliberately compile with pthreads, even though test is single-threaded.
|
|
||||||
+# We want to force gdb thread code to be exercised.
|
|
||||||
+if { [gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-w}] != "" } {
|
|
||||||
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+if [get_compiler_info ${binfile}] {
|
|
||||||
+ return -1
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+gdb_exit
|
|
||||||
+gdb_start
|
|
||||||
+gdb_reinitialize_dir $srcdir/$subdir
|
|
||||||
+gdb_load ${binfile}
|
|
||||||
+
|
|
||||||
+# We set up SIGILL nostop, noprint, pass and then run the program.
|
|
||||||
+# We expect to just see a normal run.
|
|
||||||
+gdb_test "handle SIGILL nostop noprint" "SIGILL.*No.*No.*Yes.*" "handle sigill"
|
|
||||||
+gdb_test "run" "Starting program.*ia64-sigill.*\[New thread.*\].*hello world.*Program exited normally." "run to exit"
|
|
||||||
+
|
|
||||||
Index: gdb-6.6/gdb/testsuite/gdb.arch/ia64-sigill.c
|
|
||||||
===================================================================
|
|
||||||
--- /dev/null
|
|
||||||
+++ gdb-6.6/gdb/testsuite/gdb.arch/ia64-sigill.c
|
|
||||||
@@ -0,0 +1,8 @@
|
|
||||||
+#include <stdio.h>
|
|
||||||
+
|
|
||||||
+int main()
|
|
||||||
+{
|
|
||||||
+ printf ("hello world\n");
|
|
||||||
+ return 0;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
Index: gdb-6.6/gdb/linux-nat.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.6.orig/gdb/linux-nat.c
|
|
||||||
+++ gdb-6.6/gdb/linux-nat.c
|
|
||||||
@@ -2241,7 +2241,8 @@ retry:
|
|
||||||
threads can be a bit time-consuming so if we want decent
|
|
||||||
performance with heavily multi-threaded programs, especially when
|
|
||||||
they're using a high frequency timer, we'd better avoid it if we
|
|
||||||
- can. */
|
|
||||||
+ can. For possible trap signals like SIGTRAP and SIGILL, don't
|
|
||||||
+ avoid reporting. */
|
|
||||||
|
|
||||||
if (WIFSTOPPED (status))
|
|
||||||
{
|
|
||||||
@@ -2252,7 +2253,9 @@ retry:
|
|
||||||
if (!lp->step
|
|
||||||
&& signal_stop_state (signo) == 0
|
|
||||||
&& signal_print_state (signo) == 0
|
|
||||||
- && signal_pass_state (signo) == 1)
|
|
||||||
+ && signal_pass_state (signo) == 1
|
|
||||||
+ && signo != TARGET_SIGNAL_ILL
|
|
||||||
+ && signo != TARGET_SIGNAL_TRAP)
|
|
||||||
{
|
|
||||||
/* FIMXE: kettenis/2001-06-06: Should we resume all threads
|
|
||||||
here? It is not clear we should. GDB may not expect
|
|
|
@ -1,172 +0,0 @@
|
||||||
2005-09-27 Jeff Johnston <jjohnstn@redhat.com>
|
|
||||||
|
|
||||||
* libunwind-frame.c (libunwind_frame_cache): Save the current
|
|
||||||
stack pointer in the cache.
|
|
||||||
(libunwind_sigtramp_frame_this_id): New function.
|
|
||||||
(libunwind_sigtramp_frame_unwind): New unwinder.
|
|
||||||
(libunwind_sigtramp_frame_sniffer): Return
|
|
||||||
libunwind_sigtramp_frame_unwind address.
|
|
||||||
* libunwind-frame.h (libunwind_sigtramp_frame_this_id): New
|
|
||||||
prototype.
|
|
||||||
* ia64-tdep.c (ia64_libunwind_sigtramp_frame_this_id): Calculate
|
|
||||||
the base address using the current stack pointer plus a fixed
|
|
||||||
offset.
|
|
||||||
|
|
||||||
2007-10-14 Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
||||||
|
|
||||||
Port to GDB-6.7.
|
|
||||||
|
|
||||||
2008-02-24 Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
||||||
|
|
||||||
Port to GDB-6.8pre.
|
|
||||||
|
|
||||||
2008-04-16 Yi Zhan <yi.zhan@intel.com>
|
|
||||||
|
|
||||||
Fix a compilation error on a typo.
|
|
||||||
|
|
||||||
Index: gdb-6.8cvs20080219/gdb/libunwind-frame.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.8cvs20080219.orig/gdb/libunwind-frame.c 2008-01-02 00:04:03.000000000 +0100
|
|
||||||
+++ gdb-6.8cvs20080219/gdb/libunwind-frame.c 2008-02-24 20:25:56.000000000 +0100
|
|
||||||
@@ -61,6 +61,7 @@ static unw_word_t (*unw_find_dyn_list_p)
|
|
||||||
struct libunwind_frame_cache
|
|
||||||
{
|
|
||||||
CORE_ADDR base;
|
|
||||||
+ CORE_ADDR sp;
|
|
||||||
CORE_ADDR func_addr;
|
|
||||||
unw_cursor_t cursor;
|
|
||||||
unw_addr_space_t as;
|
|
||||||
@@ -133,6 +134,7 @@ libunwind_frame_cache (struct frame_info
|
|
||||||
unw_accessors_t *acc;
|
|
||||||
unw_addr_space_t as;
|
|
||||||
unw_word_t fp;
|
|
||||||
+ unw_word_t sp;
|
|
||||||
unw_regnum_t uw_sp_regnum;
|
|
||||||
struct libunwind_frame_cache *cache;
|
|
||||||
struct libunwind_descr *descr;
|
|
||||||
@@ -171,14 +173,30 @@ libunwind_frame_cache (struct frame_info
|
|
||||||
: __LITTLE_ENDIAN);
|
|
||||||
|
|
||||||
unw_init_remote_p (&cache->cursor, as, next_frame);
|
|
||||||
+
|
|
||||||
+ /* For the base address, we have a small problem. The majority
|
|
||||||
+ of the time, we can get the stack pointer of the previous
|
|
||||||
+ frame to use as a frame pointer. In the case where we have
|
|
||||||
+ a signal trampoline, the stack may change due to a sigaltstack
|
|
||||||
+ being set up. In that case, the normal mechanism will give us
|
|
||||||
+ an address in the regular stack which is not at the end of the
|
|
||||||
+ sigaltstack as we want. To handle this, we record the stack
|
|
||||||
+ address so the caller may calculate a more correct base address
|
|
||||||
+ to use. */
|
|
||||||
+ uw_sp_regnum = descr->gdb2uw (gdbarch_sp_regnum (gdbarch));
|
|
||||||
+ ret = unw_get_reg_p (&cache->cursor, uw_sp_regnum, &sp);
|
|
||||||
+ if (ret < 0)
|
|
||||||
+ {
|
|
||||||
+ unw_destroy_addr_space_p (as);
|
|
||||||
+ error (_("Can't get libunwind sp register."));
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
if (unw_step_p (&cache->cursor) < 0)
|
|
||||||
{
|
|
||||||
unw_destroy_addr_space_p (as);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
- /* To get base address, get sp from previous frame. */
|
|
||||||
- uw_sp_regnum = descr->gdb2uw (gdbarch_sp_regnum (gdbarch));
|
|
||||||
ret = unw_get_reg_p (&cache->cursor, uw_sp_regnum, &fp);
|
|
||||||
if (ret < 0)
|
|
||||||
{
|
|
||||||
@@ -186,6 +204,7 @@ libunwind_frame_cache (struct frame_info
|
|
||||||
error (_("Can't get libunwind sp register."));
|
|
||||||
}
|
|
||||||
|
|
||||||
+ cache->sp = (CORE_ADDR)sp;
|
|
||||||
cache->base = (CORE_ADDR)fp;
|
|
||||||
cache->as = as;
|
|
||||||
|
|
||||||
@@ -381,6 +400,31 @@ libunwind_search_unwind_table (void *as,
|
|
||||||
di, pi, need_unwind_info, args);
|
|
||||||
}
|
|
||||||
|
|
||||||
+void
|
|
||||||
+libunwind_sigtramp_frame_this_id (struct frame_info *next_frame,
|
|
||||||
+ void **this_cache,
|
|
||||||
+ struct frame_id *this_id)
|
|
||||||
+{
|
|
||||||
+ struct libunwind_frame_cache *cache =
|
|
||||||
+ libunwind_frame_cache (next_frame, this_cache);
|
|
||||||
+
|
|
||||||
+ /* Unlike a regular frame, we can't use the normal frame pointer
|
|
||||||
+ mechanism because a sigaltstack may have been used. Instead,
|
|
||||||
+ we return the current stack pointer for the caller to use
|
|
||||||
+ to calculate the base address. */
|
|
||||||
+ if (cache != NULL)
|
|
||||||
+ (*this_id) = frame_id_build (cache->sp, cache->func_addr);
|
|
||||||
+ else
|
|
||||||
+ (*this_id) = null_frame_id;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static const struct frame_unwind libunwind_sigtramp_frame_unwind =
|
|
||||||
+{
|
|
||||||
+ SIGTRAMP_FRAME,
|
|
||||||
+ libunwind_sigtramp_frame_this_id,
|
|
||||||
+ libunwind_frame_prev_register
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
/* Verify if we are in a sigtramp frame and we can use libunwind to unwind. */
|
|
||||||
const struct frame_unwind *
|
|
||||||
libunwind_sigtramp_frame_sniffer (struct frame_info *next_frame)
|
|
||||||
@@ -419,7 +463,7 @@ libunwind_sigtramp_frame_sniffer (struct
|
|
||||||
ret = unw_is_signal_frame_p (&cursor);
|
|
||||||
unw_destroy_addr_space_p (as);
|
|
||||||
if (ret > 0)
|
|
||||||
- return &libunwind_frame_unwind;
|
|
||||||
+ return &libunwind_sigtramp_frame_unwind;
|
|
||||||
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
Index: gdb-6.8cvs20080219/gdb/libunwind-frame.h
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.8cvs20080219.orig/gdb/libunwind-frame.h 2008-01-02 00:04:03.000000000 +0100
|
|
||||||
+++ gdb-6.8cvs20080219/gdb/libunwind-frame.h 2008-02-24 20:23:47.000000000 +0100
|
|
||||||
@@ -47,6 +47,9 @@ void libunwind_frame_set_descr (struct g
|
|
||||||
|
|
||||||
void libunwind_frame_this_id (struct frame_info *next_frame, void **this_cache,
|
|
||||||
struct frame_id *this_id);
|
|
||||||
+void libunwind_sigtramp_frame_this_id (struct frame_info *next_frame,
|
|
||||||
+ void **this_cache,
|
|
||||||
+ struct frame_id *this_id);
|
|
||||||
void libunwind_frame_prev_register (struct frame_info *next_frame, void **this_cache,
|
|
||||||
int regnum, int *optimizedp,
|
|
||||||
enum lval_type *lvalp, CORE_ADDR *addrp,
|
|
||||||
Index: gdb-6.8cvs20080219/gdb/ia64-tdep.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.8cvs20080219.orig/gdb/ia64-tdep.c 2008-02-24 20:23:40.000000000 +0100
|
|
||||||
+++ gdb-6.8cvs20080219/gdb/ia64-tdep.c 2008-02-24 20:23:47.000000000 +0100
|
|
||||||
@@ -2942,7 +2942,7 @@ ia64_libunwind_sigtramp_frame_this_id (s
|
|
||||||
struct frame_id id;
|
|
||||||
CORE_ADDR prev_ip;
|
|
||||||
|
|
||||||
- libunwind_frame_this_id (next_frame, this_cache, &id);
|
|
||||||
+ libunwind_sigtramp_frame_this_id (next_frame, this_cache, &id);
|
|
||||||
if (frame_id_eq (id, null_frame_id))
|
|
||||||
{
|
|
||||||
(*this_id) = null_frame_id;
|
|
||||||
@@ -2954,8 +2954,14 @@ ia64_libunwind_sigtramp_frame_this_id (s
|
|
||||||
frame_unwind_register (next_frame, IA64_BSP_REGNUM, buf);
|
|
||||||
bsp = extract_unsigned_integer (buf, 8);
|
|
||||||
|
|
||||||
- /* For a sigtramp frame, we don't make the check for previous ip being 0. */
|
|
||||||
- (*this_id) = frame_id_build_special (id.stack_addr, id.code_addr, bsp);
|
|
||||||
+ /* For a sigtramp frame, we don't make the check for previous ip being 0.
|
|
||||||
+ We also must calculate the frame pointer because libunwind will give
|
|
||||||
+ us back the current stack pointer instead of the frame pointer since
|
|
||||||
+ it cannot figure this out when in a sigaltstack. We make a basic
|
|
||||||
+ assumption of 16 (default size) + 8 bytes for sigcontext address.
|
|
||||||
+ FIXME: if libunwind were to export the frame pointer address, we
|
|
||||||
+ could eliminate the assumption and get the actual value. */
|
|
||||||
+ (*this_id) = frame_id_build_special (id.stack_addr + 24, id.code_addr, bsp);
|
|
||||||
|
|
||||||
if (gdbarch_debug >= 1)
|
|
||||||
fprintf_unfiltered (gdb_stdlog,
|
|
|
@ -1,156 +0,0 @@
|
||||||
2005-07-08 Jeff Johnston <jjohnstn@redhat.com>
|
|
||||||
|
|
||||||
* ia64-tdep.c (ia64_sigtramp_frame_prev_register): Build
|
|
||||||
pseudo-registers the same as ia64_pseudo_register_read.
|
|
||||||
|
|
||||||
2008-04-16 Yi Zhan <yi.zhan@intel.com>
|
|
||||||
|
|
||||||
* ia64-tdep.c (ia64_sigtramp_frame_prev_register): Fix an
|
|
||||||
ISO C compliance compilation error.
|
|
||||||
|
|
||||||
Index: gdb-6.8/gdb/ia64-tdep.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.8.orig/gdb/ia64-tdep.c 2008-07-14 10:24:32.000000000 +0200
|
|
||||||
+++ gdb-6.8/gdb/ia64-tdep.c 2008-07-14 10:26:46.000000000 +0200
|
|
||||||
@@ -2043,7 +2043,100 @@ ia64_sigtramp_frame_prev_register (struc
|
|
||||||
pc &= ~0xf;
|
|
||||||
store_unsigned_integer (valuep, 8, pc);
|
|
||||||
}
|
|
||||||
- else if ((regnum >= IA64_GR32_REGNUM && regnum <= IA64_GR127_REGNUM) ||
|
|
||||||
+ else if (IA64_NAT0_REGNUM <= regnum && regnum <= IA64_NAT31_REGNUM)
|
|
||||||
+ {
|
|
||||||
+ /* NAT pseudo registers 0-31: get them from UNAT.
|
|
||||||
+ * "copied" from ia64_pseudo_register_read() */
|
|
||||||
+ CORE_ADDR addr = 0;
|
|
||||||
+ ULONGEST unatN_val;
|
|
||||||
+ ULONGEST unat;
|
|
||||||
+ read_memory (cache->saved_regs[IA64_UNAT_REGNUM], (char *) &unat,
|
|
||||||
+ register_size (current_gdbarch, IA64_UNAT_REGNUM));
|
|
||||||
+ unatN_val = (unat & (1LL << (regnum - IA64_NAT0_REGNUM))) != 0;
|
|
||||||
+ store_unsigned_integer (valuep, register_size (current_gdbarch, regnum),
|
|
||||||
+ unatN_val);
|
|
||||||
+ *lvalp = lval_memory;
|
|
||||||
+ *addrp = cache->saved_regs[IA64_UNAT_REGNUM];
|
|
||||||
+ }
|
|
||||||
+ else if (IA64_NAT32_REGNUM <= regnum && regnum <= IA64_NAT127_REGNUM)
|
|
||||||
+ {
|
|
||||||
+ /* NAT pseudo registers 32-127.
|
|
||||||
+ * "copied" from ia64_pseudo_register_read()
|
|
||||||
+ * FIXME: Not currently tested -- cannot get the frame to include
|
|
||||||
+ * NAT32-NAT127. */
|
|
||||||
+ ULONGEST bsp;
|
|
||||||
+ ULONGEST cfm;
|
|
||||||
+ ULONGEST natN_val = 0;
|
|
||||||
+ CORE_ADDR gr_addr = 0, nat_addr = 0;
|
|
||||||
+
|
|
||||||
+ read_memory (cache->saved_regs[IA64_BSP_REGNUM], (char *) &bsp,
|
|
||||||
+ register_size (current_gdbarch, IA64_BSP_REGNUM));
|
|
||||||
+ read_memory (cache->saved_regs[IA64_CFM_REGNUM], (char *) &cfm,
|
|
||||||
+ register_size (current_gdbarch, IA64_CFM_REGNUM));
|
|
||||||
+
|
|
||||||
+ /* The bsp points at the end of the register frame so we
|
|
||||||
+ subtract the size of frame from it to get start of register frame. */
|
|
||||||
+ bsp = rse_address_add (bsp, -(cfm & 0x7f));
|
|
||||||
+
|
|
||||||
+ if ((cfm & 0x7f) > regnum - V32_REGNUM)
|
|
||||||
+ gr_addr = rse_address_add (bsp, (regnum - V32_REGNUM));
|
|
||||||
+
|
|
||||||
+ if (gr_addr != 0)
|
|
||||||
+ {
|
|
||||||
+ /* Compute address of nat collection bits */
|
|
||||||
+ CORE_ADDR nat_collection;
|
|
||||||
+ int nat_bit;
|
|
||||||
+ nat_addr = gr_addr | 0x1f8;
|
|
||||||
+ /* If our nat collection address is bigger than bsp, we have to get
|
|
||||||
+ the nat collection from rnat. Otherwise, we fetch the nat
|
|
||||||
+ collection from the computed address. FIXME: Do not know if
|
|
||||||
+ RNAT can be not stored in the frame--being extra cautious. */
|
|
||||||
+ if (nat_addr >= bsp)
|
|
||||||
+ {
|
|
||||||
+ nat_addr = cache->saved_regs[IA64_RNAT_REGNUM];
|
|
||||||
+ if (nat_addr != 0)
|
|
||||||
+ read_memory (nat_addr, (char *) &nat_collection,
|
|
||||||
+ register_size (current_gdbarch, IA64_RNAT_REGNUM));
|
|
||||||
+ }
|
|
||||||
+ else
|
|
||||||
+ nat_collection = read_memory_integer (nat_addr, 8);
|
|
||||||
+ if (nat_addr != 0)
|
|
||||||
+ {
|
|
||||||
+ nat_bit = (gr_addr >> 3) & 0x3f;
|
|
||||||
+ natN_val = (nat_collection >> nat_bit) & 1;
|
|
||||||
+ *lvalp = lval_memory;
|
|
||||||
+ *addrp = nat_addr;
|
|
||||||
+ store_unsigned_integer (valuep,
|
|
||||||
+ register_size (current_gdbarch, regnum),
|
|
||||||
+ natN_val);
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ else if (regnum == VBOF_REGNUM)
|
|
||||||
+ {
|
|
||||||
+ /* BOF pseudo register.
|
|
||||||
+ * "copied" from ia64_pseudo_register_read()
|
|
||||||
+ *
|
|
||||||
+ * A virtual register frame start is provided for user convenience.
|
|
||||||
+ * It can be calculated as the bsp - sof (sizeof frame). */
|
|
||||||
+ ULONGEST bsp;
|
|
||||||
+ ULONGEST cfm;
|
|
||||||
+ ULONGEST bof;
|
|
||||||
+
|
|
||||||
+ read_memory (cache->saved_regs[IA64_BSP_REGNUM], (char *) &bsp,
|
|
||||||
+ register_size (current_gdbarch, IA64_BSP_REGNUM));
|
|
||||||
+ read_memory (cache->saved_regs[IA64_CFM_REGNUM], (char *) &cfm,
|
|
||||||
+ register_size (current_gdbarch, IA64_CFM_REGNUM));
|
|
||||||
+
|
|
||||||
+ /* The bsp points at the end of the register frame so we
|
|
||||||
+ subtract the size of frame from it to get beginning of frame. */
|
|
||||||
+ bof = rse_address_add (bsp, -(cfm & 0x7f));
|
|
||||||
+
|
|
||||||
+ store_unsigned_integer (valuep, register_size (current_gdbarch, regnum), bof);
|
|
||||||
+ *lvalp = lval_memory;
|
|
||||||
+ *addrp = 0; // NOTE: pseudo reg not a anywhere really...
|
|
||||||
+ }
|
|
||||||
+ else if ((regnum >= IA64_GR32_REGNUM && regnum <= IA64_GR127_REGNUM) ||
|
|
||||||
(regnum >= V32_REGNUM && regnum <= V127_REGNUM))
|
|
||||||
{
|
|
||||||
CORE_ADDR addr = 0;
|
|
||||||
@@ -2057,6 +2150,39 @@ ia64_sigtramp_frame_prev_register (struc
|
|
||||||
read_memory (addr, valuep, register_size (gdbarch, regnum));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
+ else if (VP0_REGNUM <= regnum && regnum <= VP63_REGNUM)
|
|
||||||
+ {
|
|
||||||
+ /* VP 0-63.
|
|
||||||
+ * "copied" from ia64_pseudo_register_read()
|
|
||||||
+ *
|
|
||||||
+ * FIXME: Not currently tested--cannot get the frame to include PR. */
|
|
||||||
+ CORE_ADDR pr_addr = 0;
|
|
||||||
+
|
|
||||||
+ pr_addr = cache->saved_regs[IA64_PR_REGNUM];
|
|
||||||
+ if (pr_addr != 0)
|
|
||||||
+ {
|
|
||||||
+ ULONGEST pr;
|
|
||||||
+ ULONGEST cfm;
|
|
||||||
+ ULONGEST prN_val;
|
|
||||||
+ read_memory (pr_addr, (char *) &pr,
|
|
||||||
+ register_size (current_gdbarch, IA64_PR_REGNUM));
|
|
||||||
+ read_memory (cache->saved_regs[IA64_CFM_REGNUM], (char *) &cfm,
|
|
||||||
+ register_size (current_gdbarch, IA64_CFM_REGNUM));
|
|
||||||
+
|
|
||||||
+ /* Get the register rename base for this frame and adjust the
|
|
||||||
+ * register name to take rotation into account. */
|
|
||||||
+ if (VP16_REGNUM <= regnum && regnum <= VP63_REGNUM)
|
|
||||||
+ {
|
|
||||||
+ int rrb_pr = (cfm >> 32) & 0x3f;
|
|
||||||
+ regnum = VP16_REGNUM + ((regnum - VP16_REGNUM) + rrb_pr) % 48;
|
|
||||||
+ }
|
|
||||||
+ prN_val = (pr & (1LL << (regnum - VP0_REGNUM))) != 0;
|
|
||||||
+ store_unsigned_integer (valuep, register_size (current_gdbarch, regnum),
|
|
||||||
+ prN_val);
|
|
||||||
+ *lvalp = lval_memory;
|
|
||||||
+ *addrp = pr_addr;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
else
|
|
||||||
{
|
|
||||||
/* All other registers not listed above. */
|
|
|
@ -1,3 +1,11 @@
|
||||||
|
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jeff Johnston <jjohnstn@redhat.com>
|
||||||
|
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||||
|
Subject: gdb-6.3-inferior-notification-20050721.patch
|
||||||
|
|
||||||
|
;; Notify observers that the inferior has been created
|
||||||
|
;;=fedoratest
|
||||||
|
|
||||||
2005-07-21 Jeff Johnston <jjohnstn@redhat.com>
|
2005-07-21 Jeff Johnston <jjohnstn@redhat.com>
|
||||||
|
|
||||||
* gdb.base/attach-32.exp: New test for attaching in 32-bit
|
* gdb.base/attach-32.exp: New test for attaching in 32-bit
|
||||||
|
@ -9,8 +17,10 @@
|
||||||
|
|
||||||
* gdb.base/attach-32.exp: Fix forgotten $GDBFLAGS as set.
|
* gdb.base/attach-32.exp: Fix forgotten $GDBFLAGS as set.
|
||||||
|
|
||||||
--- gdb-6.3/gdb/testsuite/gdb.base/attach-32.c.fix3 2005-07-21 14:23:50.000000000 -0400
|
diff --git a/gdb/testsuite/gdb.base/attach-32.c b/gdb/testsuite/gdb.base/attach-32.c
|
||||||
+++ gdb-6.3/gdb/testsuite/gdb.base/attach-32.c 2005-07-21 14:05:56.000000000 -0400
|
new file mode 100644
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/gdb/testsuite/gdb.base/attach-32.c
|
||||||
@@ -0,0 +1,20 @@
|
@@ -0,0 +1,20 @@
|
||||||
+/* This program is intended to be started outside of gdb, and then
|
+/* This program is intended to be started outside of gdb, and then
|
||||||
+ attached to by gdb. Thus, it simply spins in a loop. The loop
|
+ attached to by gdb. Thus, it simply spins in a loop. The loop
|
||||||
|
@ -32,9 +42,11 @@
|
||||||
+ }
|
+ }
|
||||||
+ return 0;
|
+ return 0;
|
||||||
+}
|
+}
|
||||||
--- gdb-6.3/gdb/testsuite/gdb.base/attach-32.exp.fix3 2005-07-21 14:23:45.000000000 -0400
|
diff --git a/gdb/testsuite/gdb.base/attach-32.exp b/gdb/testsuite/gdb.base/attach-32.exp
|
||||||
+++ gdb-6.3/gdb/testsuite/gdb.base/attach-32.exp 2005-07-21 17:58:28.000000000 -0400
|
new file mode 100644
|
||||||
@@ -0,0 +1,252 @@
|
--- /dev/null
|
||||||
|
+++ b/gdb/testsuite/gdb.base/attach-32.exp
|
||||||
|
@@ -0,0 +1,245 @@
|
||||||
+# Copyright 2005 Free Software Foundation, Inc.
|
+# Copyright 2005 Free Software Foundation, Inc.
|
||||||
+
|
+
|
||||||
+# This program is free software; you can redistribute it and/or modify
|
+# This program is free software; you can redistribute it and/or modify
|
||||||
|
@ -53,13 +65,6 @@
|
||||||
+#
|
+#
|
||||||
+# This test was based on attach.exp and modified for 32/64 bit Linux systems. */
|
+# This test was based on attach.exp and modified for 32/64 bit Linux systems. */
|
||||||
+
|
+
|
||||||
+if $tracelevel then {
|
|
||||||
+ strace $tracelevel
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+set prms_id 0
|
|
||||||
+set bug_id 0
|
|
||||||
+
|
|
||||||
+# On HP-UX 11.0, this test is causing a process running the program
|
+# On HP-UX 11.0, this test is causing a process running the program
|
||||||
+# "attach" to be left around spinning. Until we figure out why, I am
|
+# "attach" to be left around spinning. Until we figure out why, I am
|
||||||
+# commenting out the test to avoid polluting tiamat (our 11.0 nightly
|
+# commenting out the test to avoid polluting tiamat (our 11.0 nightly
|
||||||
|
@ -80,9 +85,9 @@
|
||||||
+set testfile "attach-32"
|
+set testfile "attach-32"
|
||||||
+set srcfile ${testfile}.c
|
+set srcfile ${testfile}.c
|
||||||
+set srcfile2 ${testfile}b.c
|
+set srcfile2 ${testfile}b.c
|
||||||
+set binfile ${objdir}/${subdir}/${testfile}
|
+set binfile [standard_output_file ${testfile}]
|
||||||
+set binfile2 ${objdir}/${subdir}/${testfile}b
|
+set binfile2 [standard_output_file ${testfile}b]
|
||||||
+set escapedbinfile [string_to_regexp ${objdir}/${subdir}/${testfile}]
|
+set escapedbinfile [string_to_regexp [standard_output_file ${testfile}]]
|
||||||
+
|
+
|
||||||
+#execute_anywhere "rm -f ${binfile} ${binfile2}"
|
+#execute_anywhere "rm -f ${binfile} ${binfile2}"
|
||||||
+remote_exec build "rm -f ${binfile} ${binfile2}"
|
+remote_exec build "rm -f ${binfile} ${binfile2}"
|
||||||
|
@ -131,7 +136,7 @@
|
||||||
+
|
+
|
||||||
+ send_gdb "tbreak 19\n"
|
+ send_gdb "tbreak 19\n"
|
||||||
+ gdb_expect {
|
+ gdb_expect {
|
||||||
+ -re "Breakpoint .*at.*$srcfile, line 19.*$gdb_prompt $" {
|
+ -re "reakpoint .*at.*$srcfile, line 19.*$gdb_prompt $" {
|
||||||
+ pass "after attach-32, set tbreak postloop"
|
+ pass "after attach-32, set tbreak postloop"
|
||||||
+ }
|
+ }
|
||||||
+ -re "$gdb_prompt $" {
|
+ -re "$gdb_prompt $" {
|
||||||
|
@ -156,7 +161,7 @@
|
||||||
+
|
+
|
||||||
+ # Allow the test process to exit, to cleanup after ourselves.
|
+ # Allow the test process to exit, to cleanup after ourselves.
|
||||||
+
|
+
|
||||||
+ gdb_test "continue" "Program exited normally." "after attach-32, exit"
|
+ gdb_test "continue" {\[Inferior .* exited normally\]} "after attach-32, exit"
|
||||||
+
|
+
|
||||||
+ # Make sure we don't leave a process around to confuse
|
+ # Make sure we don't leave a process around to confuse
|
||||||
+ # the next test run (and prevent the compile by keeping
|
+ # the next test run (and prevent the compile by keeping
|
||||||
|
@ -237,7 +242,7 @@
|
||||||
+ # Get rid of the process
|
+ # Get rid of the process
|
||||||
+
|
+
|
||||||
+ gdb_test "p should_exit = 1"
|
+ gdb_test "p should_exit = 1"
|
||||||
+ gdb_test "c" "Program exited normally."
|
+ gdb_test "c" {\[Inferior .* exited normally\]}
|
||||||
+
|
+
|
||||||
+ # Be paranoid
|
+ # Be paranoid
|
||||||
+
|
+
|
||||||
|
@ -257,7 +262,7 @@
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
+set GDBFLAGS_orig $GDBFLAGS
|
+set GDBFLAGS_orig $GDBFLAGS
|
||||||
+set GDBFLAGS "--pid=$testpid"
|
+set GDBFLAGS "-iex \"set height 0\" --pid=$testpid"
|
||||||
+gdb_start
|
+gdb_start
|
||||||
+set GDBFLAGS $GDBFLAGS_orig
|
+set GDBFLAGS $GDBFLAGS_orig
|
||||||
+
|
+
|
||||||
|
@ -279,7 +284,7 @@
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
+set GDBFLAGS_orig $GDBFLAGS
|
+set GDBFLAGS_orig $GDBFLAGS
|
||||||
+set GDBFLAGS "--pid=$testpid"
|
+set GDBFLAGS "-iex \"set height 0\" --pid=$testpid"
|
||||||
+gdb_start
|
+gdb_start
|
||||||
+set GDBFLAGS $GDBFLAGS_orig
|
+set GDBFLAGS $GDBFLAGS_orig
|
||||||
+
|
+
|
||||||
|
@ -287,8 +292,10 @@
|
||||||
+do_call_attach_tests
|
+do_call_attach_tests
|
||||||
+
|
+
|
||||||
+return 0
|
+return 0
|
||||||
--- gdb-6.3/gdb/testsuite/gdb.base/attach-32b.c.fix3 2005-07-21 14:23:57.000000000 -0400
|
diff --git a/gdb/testsuite/gdb.base/attach-32b.c b/gdb/testsuite/gdb.base/attach-32b.c
|
||||||
+++ gdb-6.3/gdb/testsuite/gdb.base/attach-32b.c 2005-07-21 14:06:02.000000000 -0400
|
new file mode 100644
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/gdb/testsuite/gdb.base/attach-32b.c
|
||||||
@@ -0,0 +1,24 @@
|
@@ -0,0 +1,24 @@
|
||||||
+/* This program is intended to be started outside of gdb, and then
|
+/* This program is intended to be started outside of gdb, and then
|
||||||
+ attached to by gdb. Thus, it simply spins in a loop. The loop
|
+ attached to by gdb. Thus, it simply spins in a loop. The loop
|
||||||
|
|
|
@ -1,25 +0,0 @@
|
||||||
2005-03-24 Jeff Johnston <jjohnstn@redhat.com>
|
|
||||||
|
|
||||||
* valops.c (check_field_in): Use check_typedef for base classes
|
|
||||||
to avoid problems with opaque type references.
|
|
||||||
|
|
||||||
Index: gdb-6.5/gdb/valops.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.5.orig/gdb/valops.c 2005-12-17 20:34:03.000000000 -0200
|
|
||||||
+++ gdb-6.5/gdb/valops.c 2006-07-07 02:35:09.000000000 -0300
|
|
||||||
@@ -2257,8 +2257,13 @@ check_field_in (struct type *type, const
|
|
||||||
}
|
|
||||||
|
|
||||||
for (i = TYPE_N_BASECLASSES (type) - 1; i >= 0; i--)
|
|
||||||
- if (check_field_in (TYPE_BASECLASS (type, i), name))
|
|
||||||
- return 1;
|
|
||||||
+ {
|
|
||||||
+ /* Check the base classes. Make sure we have the real type for
|
|
||||||
+ each base class as opposed to an opaque declaration. */
|
|
||||||
+ struct type *baseclass = check_typedef (TYPE_BASECLASS (type, i));
|
|
||||||
+ if (check_field_in (baseclass, name))
|
|
||||||
+ return 1;
|
|
||||||
+ }
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
|
@ -1,3 +1,11 @@
|
||||||
|
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jeff Johnston <jjohnstn@redhat.com>
|
||||||
|
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||||
|
Subject: gdb-6.3-inheritancetest-20050726.patch
|
||||||
|
|
||||||
|
;; Verify printing of inherited members test
|
||||||
|
;;=fedoratest
|
||||||
|
|
||||||
2005-07-26 Jeff Johnston <jjohnstn@redhat.com>
|
2005-07-26 Jeff Johnston <jjohnstn@redhat.com>
|
||||||
|
|
||||||
* gdb.cp/b146835.exp: New testcase.
|
* gdb.cp/b146835.exp: New testcase.
|
||||||
|
@ -5,22 +13,10 @@
|
||||||
* gdb.cp/b146835b.cc: Ditto.
|
* gdb.cp/b146835b.cc: Ditto.
|
||||||
* gdb.cp/b146835.h: Ditto.
|
* gdb.cp/b146835.h: Ditto.
|
||||||
|
|
||||||
--- gdb-6.3/gdb/testsuite/gdb.cp/b146835b.cc.fix3 2005-07-26 16:47:12.000000000 -0400
|
diff --git a/gdb/testsuite/gdb.cp/b146835.cc b/gdb/testsuite/gdb.cp/b146835.cc
|
||||||
+++ gdb-6.3/gdb/testsuite/gdb.cp/b146835b.cc 2005-07-26 16:53:31.000000000 -0400
|
new file mode 100644
|
||||||
@@ -0,0 +1,11 @@
|
--- /dev/null
|
||||||
+#include "b146835.h"
|
+++ b/gdb/testsuite/gdb.cp/b146835.cc
|
||||||
+
|
|
||||||
+C::C() { d = 0; x = 3; }
|
|
||||||
+
|
|
||||||
+int C::z (char *s) { return 0; }
|
|
||||||
+
|
|
||||||
+C::~C() {}
|
|
||||||
+
|
|
||||||
+void A::funcD (class E *e, class D *d) {}
|
|
||||||
+void A::funcE (E *e, D *d) {}
|
|
||||||
+void A::funcF (unsigned long x, D *d) {}
|
|
||||||
--- gdb-6.3/gdb/testsuite/gdb.cp/b146835.cc.fix3 2005-07-26 16:47:20.000000000 -0400
|
|
||||||
+++ gdb-6.3/gdb/testsuite/gdb.cp/b146835.cc 2005-07-26 16:46:50.000000000 -0400
|
|
||||||
@@ -0,0 +1,32 @@
|
@@ -0,0 +1,32 @@
|
||||||
+#include "b146835.h"
|
+#include "b146835.h"
|
||||||
+#include <iostream>
|
+#include <iostream>
|
||||||
|
@ -54,9 +50,11 @@
|
||||||
+ f.foo();
|
+ f.foo();
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
--- gdb-6.3/gdb/testsuite/gdb.cp/b146835.exp.fix3 2005-07-26 16:47:26.000000000 -0400
|
diff --git a/gdb/testsuite/gdb.cp/b146835.exp b/gdb/testsuite/gdb.cp/b146835.exp
|
||||||
+++ gdb-6.3/gdb/testsuite/gdb.cp/b146835.exp 2005-07-26 16:46:50.000000000 -0400
|
new file mode 100644
|
||||||
@@ -0,0 +1,55 @@
|
--- /dev/null
|
||||||
|
+++ b/gdb/testsuite/gdb.cp/b146835.exp
|
||||||
|
@@ -0,0 +1,47 @@
|
||||||
+# This testcase is part of GDB, the GNU debugger.
|
+# This testcase is part of GDB, the GNU debugger.
|
||||||
+
|
+
|
||||||
+# Copyright 2005 Free Software Foundation, Inc.
|
+# Copyright 2005 Free Software Foundation, Inc.
|
||||||
|
@ -78,17 +76,10 @@
|
||||||
+# Check that GDB can properly print an inherited member variable
|
+# Check that GDB can properly print an inherited member variable
|
||||||
+# (Bugzilla 146835)
|
+# (Bugzilla 146835)
|
||||||
+
|
+
|
||||||
+if $tracelevel {
|
|
||||||
+ strace $tracelevel
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+set prms_id 0
|
|
||||||
+set bug_id 0
|
|
||||||
+
|
|
||||||
+set testfile "b146835"
|
+set testfile "b146835"
|
||||||
+set srcfile ${testfile}.cc
|
+set srcfile ${testfile}.cc
|
||||||
+set srcfile2 ${testfile}b.cc
|
+set srcfile2 ${testfile}b.cc
|
||||||
+set binfile ${objdir}/${subdir}/${testfile}
|
+set binfile [standard_output_file ${testfile}]
|
||||||
+if {[gdb_compile "${srcdir}/${subdir}/${srcfile} ${srcdir}/${subdir}/${srcfile2}" "${binfile}" executable {debug c++}] != "" } {
|
+if {[gdb_compile "${srcdir}/${subdir}/${srcfile} ${srcdir}/${subdir}/${srcfile2}" "${binfile}" executable {debug c++}] != "" } {
|
||||||
+ return -1
|
+ return -1
|
||||||
+}
|
+}
|
||||||
|
@ -110,10 +101,11 @@
|
||||||
+gdb_continue_to_breakpoint "First line foo"
|
+gdb_continue_to_breakpoint "First line foo"
|
||||||
+
|
+
|
||||||
+# Verify that we can access the inherited member d
|
+# Verify that we can access the inherited member d
|
||||||
+gdb_test "p d" ".*(struct D \*.).*0x0" "Verify inherited member d accessible"
|
+gdb_test "p d" " = \\(D \\*\\) *0x0" "Verify inherited member d accessible"
|
||||||
+
|
diff --git a/gdb/testsuite/gdb.cp/b146835.h b/gdb/testsuite/gdb.cp/b146835.h
|
||||||
--- gdb-6.3/gdb/testsuite/gdb.cp/b146835.h.fix3 2005-07-26 16:47:36.000000000 -0400
|
new file mode 100644
|
||||||
+++ gdb-6.3/gdb/testsuite/gdb.cp/b146835.h 2005-07-26 16:53:18.000000000 -0400
|
--- /dev/null
|
||||||
|
+++ b/gdb/testsuite/gdb.cp/b146835.h
|
||||||
@@ -0,0 +1,36 @@
|
@@ -0,0 +1,36 @@
|
||||||
+
|
+
|
||||||
+class A {
|
+class A {
|
||||||
|
@ -151,3 +143,19 @@
|
||||||
+ int z (char *s);
|
+ int z (char *s);
|
||||||
+ virtual ~C();
|
+ virtual ~C();
|
||||||
+};
|
+};
|
||||||
|
diff --git a/gdb/testsuite/gdb.cp/b146835b.cc b/gdb/testsuite/gdb.cp/b146835b.cc
|
||||||
|
new file mode 100644
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/gdb/testsuite/gdb.cp/b146835b.cc
|
||||||
|
@@ -0,0 +1,11 @@
|
||||||
|
+#include "b146835.h"
|
||||||
|
+
|
||||||
|
+C::C() { d = 0; x = 3; }
|
||||||
|
+
|
||||||
|
+int C::z (char *s) { return 0; }
|
||||||
|
+
|
||||||
|
+C::~C() {}
|
||||||
|
+
|
||||||
|
+void A::funcD (class E *e, class D *d) {}
|
||||||
|
+void A::funcE (E *e, D *d) {}
|
||||||
|
+void A::funcF (unsigned long x, D *d) {}
|
||||||
|
|
|
@ -1,317 +0,0 @@
|
||||||
2005-12-14 Jeff Johnston <jjohnstn@redhat.com>
|
|
||||||
|
|
||||||
* symfile-mem.c (read_memory): New static read callback function.
|
|
||||||
(symfile_add_from_memory): Pass read_memory to bfd instead of
|
|
||||||
target_read_memory.
|
|
||||||
* target.c (target_xfer_memory): Add support for LONGEST len and
|
|
||||||
change all callers.
|
|
||||||
(deprecated_debug_xfer_memory, target_read_memory): Ditto.
|
|
||||||
(target_write_memory, do_xfer_memory): Ditto.
|
|
||||||
(target_xfer_memory_partial, target_read_memory_partial): Ditto.
|
|
||||||
(target_write_memory_partial): Ditto.
|
|
||||||
* infptrace.c (child_xfer_memory): Ditto.
|
|
||||||
* linux-nat.c (linux_nat_xfer_memory): Ditto.
|
|
||||||
(linux_nat_proc_xfer_memory): Ditto.
|
|
||||||
* dcache.c (dcache_xfer_memory): Ditto.
|
|
||||||
* exec.c (xfer_memory): Ditto.
|
|
||||||
* remote.c (remote_xfer_memory): Ditto.
|
|
||||||
* remote-sim.c (gdbsim_xfer_interior_memory): Ditto.
|
|
||||||
* target.h: Change prototypes for functions changed above.
|
|
||||||
* linux-nat.h: Ditto.
|
|
||||||
* remote.h: Ditto.
|
|
||||||
* dcache.h: Ditto.
|
|
||||||
|
|
||||||
2007-10-15 Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
||||||
|
|
||||||
Port to GDB-6.7.
|
|
||||||
|
|
||||||
Index: gdb-6.7/gdb/symfile-mem.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.7.orig/gdb/symfile-mem.c 2007-10-13 05:29:58.000000000 +0200
|
|
||||||
+++ gdb-6.7/gdb/symfile-mem.c 2007-10-15 21:37:54.000000000 +0200
|
|
||||||
@@ -56,6 +56,14 @@
|
|
||||||
#include "elf/common.h"
|
|
||||||
|
|
||||||
|
|
||||||
+/* Local callback routine to pass to bfd to read from target memory,
|
|
||||||
+ using a len constrained to INT_MAX. */
|
|
||||||
+static int
|
|
||||||
+read_target_memory (bfd_vma addr, bfd_byte *buf, int len)
|
|
||||||
+{
|
|
||||||
+ return target_read_memory (addr, buf, (LONGEST)len);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
/* Read inferior memory at ADDR to find the header of a loaded object file
|
|
||||||
and read its in-core symbols out of inferior memory. TEMPL is a bfd
|
|
||||||
representing the target's format. NAME is the name to use for this
|
|
||||||
@@ -76,7 +84,7 @@ symbol_file_add_from_memory (struct bfd
|
|
||||||
error (_("add-symbol-file-from-memory not supported for this target"));
|
|
||||||
|
|
||||||
nbfd = bfd_elf_bfd_from_remote_memory (templ, addr, &loadbase,
|
|
||||||
- target_read_memory);
|
|
||||||
+ read_target_memory);
|
|
||||||
if (nbfd == NULL)
|
|
||||||
error (_("Failed to read a valid object file image from memory."));
|
|
||||||
|
|
||||||
Index: gdb-6.7/gdb/target.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.7.orig/gdb/target.c 2007-10-14 23:42:39.000000000 +0200
|
|
||||||
+++ gdb-6.7/gdb/target.c 2007-10-15 21:37:54.000000000 +0200
|
|
||||||
@@ -55,7 +55,7 @@ static int nosymbol (char *, CORE_ADDR *
|
|
||||||
|
|
||||||
static void tcomplain (void) ATTR_NORETURN;
|
|
||||||
|
|
||||||
-static int nomemory (CORE_ADDR, char *, int, int, struct target_ops *);
|
|
||||||
+static LONGEST nomemory (CORE_ADDR, char *, int, int, struct target_ops *);
|
|
||||||
|
|
||||||
static int return_zero (void);
|
|
||||||
|
|
||||||
@@ -275,7 +275,7 @@ target_load (char *arg, int from_tty)
|
|
||||||
(*current_target.to_load) (arg, from_tty);
|
|
||||||
}
|
|
||||||
|
|
||||||
-static int
|
|
||||||
+static LONGEST
|
|
||||||
nomemory (CORE_ADDR memaddr, char *myaddr, int len, int write,
|
|
||||||
struct target_ops *t)
|
|
||||||
{
|
|
||||||
@@ -518,7 +518,7 @@ update_current_target (void)
|
|
||||||
(void (*) (struct regcache *))
|
|
||||||
noprocess);
|
|
||||||
de_fault (deprecated_xfer_memory,
|
|
||||||
- (int (*) (CORE_ADDR, gdb_byte *, int, int, struct mem_attrib *, struct target_ops *))
|
|
||||||
+ (LONGEST (*) (CORE_ADDR, gdb_byte *, LONGEST, int, struct mem_attrib *, struct target_ops *))
|
|
||||||
nomemory);
|
|
||||||
de_fault (to_files_info,
|
|
||||||
(void (*) (struct target_ops *))
|
|
||||||
@@ -1195,7 +1195,7 @@ target_xfer_partial (struct target_ops *
|
|
||||||
it makes no progress, and then return how much was transferred). */
|
|
||||||
|
|
||||||
int
|
|
||||||
-target_read_memory (CORE_ADDR memaddr, gdb_byte *myaddr, int len)
|
|
||||||
+target_read_memory (CORE_ADDR memaddr, gdb_byte *myaddr, LONGEST len)
|
|
||||||
{
|
|
||||||
if (target_read (¤t_target, TARGET_OBJECT_MEMORY, NULL,
|
|
||||||
myaddr, memaddr, len) == len)
|
|
||||||
@@ -1205,7 +1205,7 @@ target_read_memory (CORE_ADDR memaddr, g
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
|
||||||
-target_write_memory (CORE_ADDR memaddr, const gdb_byte *myaddr, int len)
|
|
||||||
+target_write_memory (CORE_ADDR memaddr, const gdb_byte *myaddr, LONGEST len)
|
|
||||||
{
|
|
||||||
if (target_write (¤t_target, TARGET_OBJECT_MEMORY, NULL,
|
|
||||||
myaddr, memaddr, len) == len)
|
|
||||||
@@ -2228,8 +2228,8 @@ debug_to_prepare_to_store (struct regcac
|
|
||||||
fprintf_unfiltered (gdb_stdlog, "target_prepare_to_store ()\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
-static int
|
|
||||||
-deprecated_debug_xfer_memory (CORE_ADDR memaddr, bfd_byte *myaddr, int len,
|
|
||||||
+static LONGEST
|
|
||||||
+deprecated_debug_xfer_memory (CORE_ADDR memaddr, bfd_byte *myaddr, LONGEST len,
|
|
||||||
int write, struct mem_attrib *attrib,
|
|
||||||
struct target_ops *target)
|
|
||||||
{
|
|
||||||
@@ -2239,9 +2239,9 @@ deprecated_debug_xfer_memory (CORE_ADDR
|
|
||||||
attrib, target);
|
|
||||||
|
|
||||||
fprintf_unfiltered (gdb_stdlog,
|
|
||||||
- "target_xfer_memory (0x%x, xxx, %d, %s, xxx) = %d",
|
|
||||||
+ "target_xfer_memory (0x%x, xxx, %ld, %s, xxx) = %d",
|
|
||||||
(unsigned int) memaddr, /* possable truncate long long */
|
|
||||||
- len, write ? "write" : "read", retval);
|
|
||||||
+ (long)len, write ? "write" : "read", retval);
|
|
||||||
|
|
||||||
if (retval > 0)
|
|
||||||
{
|
|
||||||
Index: gdb-6.7/gdb/target.h
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.7.orig/gdb/target.h 2007-10-14 23:24:52.000000000 +0200
|
|
||||||
+++ gdb-6.7/gdb/target.h 2007-10-15 21:39:20.000000000 +0200
|
|
||||||
@@ -351,10 +351,10 @@ struct target_ops
|
|
||||||
NOTE: cagney/2004-10-01: This has been entirely superseeded by
|
|
||||||
to_xfer_partial and inferior inheritance. */
|
|
||||||
|
|
||||||
- int (*deprecated_xfer_memory) (CORE_ADDR memaddr, gdb_byte *myaddr,
|
|
||||||
- int len, int write,
|
|
||||||
- struct mem_attrib *attrib,
|
|
||||||
- struct target_ops *target);
|
|
||||||
+ LONGEST (*deprecated_xfer_memory) (CORE_ADDR memaddr, gdb_byte *myaddr,
|
|
||||||
+ LONGEST len, int write,
|
|
||||||
+ struct mem_attrib *attrib,
|
|
||||||
+ struct target_ops *target);
|
|
||||||
|
|
||||||
void (*to_files_info) (struct target_ops *);
|
|
||||||
int (*to_insert_breakpoint) (struct bp_target_info *);
|
|
||||||
@@ -615,13 +615,14 @@ extern DCACHE *target_dcache;
|
|
||||||
|
|
||||||
extern int target_read_string (CORE_ADDR, char **, int, int *);
|
|
||||||
|
|
||||||
-extern int target_read_memory (CORE_ADDR memaddr, gdb_byte *myaddr, int len);
|
|
||||||
+extern int target_read_memory (CORE_ADDR memaddr, gdb_byte *myaddr,
|
|
||||||
+ LONGEST len);
|
|
||||||
|
|
||||||
extern int target_write_memory (CORE_ADDR memaddr, const gdb_byte *myaddr,
|
|
||||||
- int len);
|
|
||||||
+ LONGEST len);
|
|
||||||
|
|
||||||
-extern int xfer_memory (CORE_ADDR, gdb_byte *, int, int,
|
|
||||||
- struct mem_attrib *, struct target_ops *);
|
|
||||||
+extern LONGEST xfer_memory (CORE_ADDR, gdb_byte *, LONGEST, int,
|
|
||||||
+ struct mem_attrib *, struct target_ops *);
|
|
||||||
|
|
||||||
/* Fetches the target's memory map. If one is found it is sorted
|
|
||||||
and returned, after some consistency checking. Otherwise, NULL
|
|
||||||
Index: gdb-6.7/gdb/dcache.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.7.orig/gdb/dcache.c 2007-08-23 20:08:28.000000000 +0200
|
|
||||||
+++ gdb-6.7/gdb/dcache.c 2007-10-15 21:37:54.000000000 +0200
|
|
||||||
@@ -517,9 +517,9 @@ dcache_free (DCACHE *dcache)
|
|
||||||
|
|
||||||
This routine is indended to be called by remote_xfer_ functions. */
|
|
||||||
|
|
||||||
-int
|
|
||||||
+LONGEST
|
|
||||||
dcache_xfer_memory (DCACHE *dcache, CORE_ADDR memaddr, gdb_byte *myaddr,
|
|
||||||
- int len, int should_write)
|
|
||||||
+ LONGEST len, int should_write)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
int (*xfunc) (DCACHE *dcache, CORE_ADDR addr, gdb_byte *ptr);
|
|
||||||
Index: gdb-6.7/gdb/dcache.h
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.7.orig/gdb/dcache.h 2007-08-23 20:08:28.000000000 +0200
|
|
||||||
+++ gdb-6.7/gdb/dcache.h 2007-10-15 21:37:54.000000000 +0200
|
|
||||||
@@ -35,7 +35,7 @@ void dcache_free (DCACHE *);
|
|
||||||
|
|
||||||
/* Simple to call from <remote>_xfer_memory */
|
|
||||||
|
|
||||||
-int dcache_xfer_memory (DCACHE *cache, CORE_ADDR mem, gdb_byte *my,
|
|
||||||
- int len, int should_write);
|
|
||||||
+LONGEST dcache_xfer_memory (DCACHE *cache, CORE_ADDR mem, gdb_byte *my,
|
|
||||||
+ LONGEST len, int should_write);
|
|
||||||
|
|
||||||
#endif /* DCACHE_H */
|
|
||||||
Index: gdb-6.7/gdb/exec.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.7.orig/gdb/exec.c 2007-08-23 20:08:28.000000000 +0200
|
|
||||||
+++ gdb-6.7/gdb/exec.c 2007-10-15 21:37:54.000000000 +0200
|
|
||||||
@@ -453,8 +453,8 @@ map_vmap (bfd *abfd, bfd *arch)
|
|
||||||
The same routine is used to handle both core and exec files;
|
|
||||||
we just tail-call it with more arguments to select between them. */
|
|
||||||
|
|
||||||
-int
|
|
||||||
-xfer_memory (CORE_ADDR memaddr, gdb_byte *myaddr, int len, int write,
|
|
||||||
+LONGEST
|
|
||||||
+xfer_memory (CORE_ADDR memaddr, gdb_byte *myaddr, LONGEST len, int write,
|
|
||||||
struct mem_attrib *attrib, struct target_ops *target)
|
|
||||||
{
|
|
||||||
int res;
|
|
||||||
Index: gdb-6.7/gdb/linux-nat.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.7.orig/gdb/linux-nat.c 2007-10-15 00:13:52.000000000 +0200
|
|
||||||
+++ gdb-6.7/gdb/linux-nat.c 2007-10-15 21:37:54.000000000 +0200
|
|
||||||
@@ -3248,7 +3248,7 @@ linux_xfer_partial (struct target_ops *o
|
|
||||||
Revert when Bugzilla 147436 is fixed. */
|
|
||||||
if (iterate_over_lwps (ia64_linux_check_stack_region, &range) != NULL)
|
|
||||||
{ /* This region contains ia64 rse registers, we have to re-read. */
|
|
||||||
- int xxfer;
|
|
||||||
+ LONGEST xxfer;
|
|
||||||
|
|
||||||
/* Re-read register stack area. */
|
|
||||||
xxfer = super_xfer_partial (ops, object, annex,
|
|
||||||
Index: gdb-6.7/gdb/remote.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.7.orig/gdb/remote.c 2007-10-14 23:42:39.000000000 +0200
|
|
||||||
+++ gdb-6.7/gdb/remote.c 2007-10-15 21:37:54.000000000 +0200
|
|
||||||
@@ -25,6 +25,7 @@
|
|
||||||
#include "gdb_string.h"
|
|
||||||
#include <ctype.h>
|
|
||||||
#include <fcntl.h>
|
|
||||||
+#include <limits.h>
|
|
||||||
#include "inferior.h"
|
|
||||||
#include "bfd.h"
|
|
||||||
#include "symfile.h"
|
|
||||||
@@ -4484,19 +4485,27 @@ remote_read_bytes (CORE_ADDR memaddr, gd
|
|
||||||
if SHOULD_WRITE is nonzero. Returns length of data written or
|
|
||||||
read; 0 for error. TARGET is unused. */
|
|
||||||
|
|
||||||
-static int
|
|
||||||
-remote_xfer_memory (CORE_ADDR mem_addr, gdb_byte *buffer, int mem_len,
|
|
||||||
+static LONGEST
|
|
||||||
+remote_xfer_memory (CORE_ADDR mem_addr, gdb_byte *buffer, LONGEST mem_len,
|
|
||||||
int should_write, struct mem_attrib *attrib,
|
|
||||||
struct target_ops *target)
|
|
||||||
{
|
|
||||||
int res;
|
|
||||||
+ int len;
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+ /* This routine is not set up to handle > INT_MAX bytes. */
|
|
||||||
+ if (mem_len >= (LONGEST)INT_MAX)
|
|
||||||
+ return 0;
|
|
||||||
+
|
|
||||||
+ len = (int)mem_len;
|
|
||||||
|
|
||||||
if (should_write)
|
|
||||||
res = remote_write_bytes (mem_addr, buffer, mem_len);
|
|
||||||
else
|
|
||||||
res = remote_read_bytes (mem_addr, buffer, mem_len);
|
|
||||||
|
|
||||||
- return res;
|
|
||||||
+ return (LONGEST)res;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Sends a packet with content determined by the printf format string
|
|
||||||
Index: gdb-6.7/gdb/remote-sim.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.7.orig/gdb/remote-sim.c 2007-08-23 20:08:36.000000000 +0200
|
|
||||||
+++ gdb-6.7/gdb/remote-sim.c 2007-10-15 21:41:33.000000000 +0200
|
|
||||||
@@ -747,11 +747,14 @@ gdbsim_prepare_to_store (struct regcache
|
|
||||||
|
|
||||||
Returns the number of bytes transferred. */
|
|
||||||
|
|
||||||
-static int
|
|
||||||
-gdbsim_xfer_inferior_memory (CORE_ADDR memaddr, gdb_byte *myaddr, int len,
|
|
||||||
+static LONGEST
|
|
||||||
+gdbsim_xfer_inferior_memory (CORE_ADDR memaddr, gdb_byte *myaddr, LONGEST len,
|
|
||||||
int write, struct mem_attrib *attrib,
|
|
||||||
struct target_ops *target)
|
|
||||||
{
|
|
||||||
+ /* Convert to len type that sim_read and sim_write can handle. */
|
|
||||||
+ int xfer_len = (int)len;
|
|
||||||
+
|
|
||||||
/* If no program is running yet, then ignore the simulator for
|
|
||||||
memory. Pass the request down to the next target, hopefully
|
|
||||||
an exec file. */
|
|
||||||
@@ -767,22 +770,22 @@ gdbsim_xfer_inferior_memory (CORE_ADDR m
|
|
||||||
printf_filtered ("gdbsim_xfer_inferior_memory: myaddr 0x");
|
|
||||||
gdb_print_host_address (myaddr, gdb_stdout);
|
|
||||||
printf_filtered (", memaddr 0x%s, len %d, write %d\n",
|
|
||||||
- paddr_nz (memaddr), len, write);
|
|
||||||
+ paddr_nz (memaddr), xfer_len, write);
|
|
||||||
if (remote_debug && write)
|
|
||||||
- dump_mem (myaddr, len);
|
|
||||||
+ dump_mem (myaddr, xfer_len);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (write)
|
|
||||||
{
|
|
||||||
- len = sim_write (gdbsim_desc, memaddr, myaddr, len);
|
|
||||||
+ xfer_len = sim_write (gdbsim_desc, memaddr, myaddr, xfer_len);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
- len = sim_read (gdbsim_desc, memaddr, myaddr, len);
|
|
||||||
- if (remote_debug && len > 0)
|
|
||||||
- dump_mem (myaddr, len);
|
|
||||||
+ xfer_len = sim_read (gdbsim_desc, memaddr, myaddr, xfer_len);
|
|
||||||
+ if (remote_debug && xfer_len > 0)
|
|
||||||
+ dump_mem (myaddr, xfer_len);
|
|
||||||
}
|
|
||||||
- return len;
|
|
||||||
+ return (LONGEST)xfer_len;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
|
@ -1,475 +0,0 @@
|
||||||
[base]
|
|
||||||
|
|
||||||
2007-09-21 Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
||||||
|
|
||||||
* linespec.c (add_minsym_members): Support also the `$allocate' and
|
|
||||||
`$delete' variants.
|
|
||||||
|
|
||||||
2007-10-05 Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
||||||
|
|
||||||
* linespec.c (add_minsym_members): Support also the `$allocate' and
|
|
||||||
`$delete' variants.
|
|
||||||
(decode_variable): Renamed to ...
|
|
||||||
(decode_variable_1) ... here, its parameter NOT_FOUND_PTR and its
|
|
||||||
exception throwing was moved to ...
|
|
||||||
(decode_variable_not_found): ... a new function here.
|
|
||||||
(decode_variable): New function.
|
|
||||||
|
|
||||||
2007-10-31 Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
||||||
|
|
||||||
Port to GDB-6.7.
|
|
||||||
|
|
||||||
[ Remove decode_variable* for GDB-6.8+ as no longer needed. ]
|
|
||||||
|
|
||||||
Index: gdb-6.7/gdb/linespec.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.7.orig/gdb/linespec.c 2007-08-23 20:08:35.000000000 +0200
|
|
||||||
+++ gdb-6.7/gdb/linespec.c 2007-10-13 05:26:33.000000000 +0200
|
|
||||||
@@ -36,6 +36,7 @@
|
|
||||||
#include "linespec.h"
|
|
||||||
#include "exceptions.h"
|
|
||||||
#include "language.h"
|
|
||||||
+#include "gdb_assert.h"
|
|
||||||
|
|
||||||
/* We share this one with symtab.c, but it is not exported widely. */
|
|
||||||
|
|
||||||
@@ -75,7 +76,8 @@ static struct symtabs_and_lines find_met
|
|
||||||
|
|
||||||
static int collect_methods (char *copy, struct type *t,
|
|
||||||
struct symbol *sym_class,
|
|
||||||
- struct symbol **sym_arr);
|
|
||||||
+ struct symbol **sym_arr,
|
|
||||||
+ struct minimal_symbol **msym_arr);
|
|
||||||
|
|
||||||
static NORETURN void cplusplus_error (const char *name,
|
|
||||||
const char *fmt, ...)
|
|
||||||
@@ -84,11 +86,13 @@ static NORETURN void cplusplus_error (co
|
|
||||||
static int total_number_of_methods (struct type *type);
|
|
||||||
|
|
||||||
static int find_methods (struct type *, char *,
|
|
||||||
- enum language, struct symbol **);
|
|
||||||
+ enum language, struct symbol **,
|
|
||||||
+ struct minimal_symbol **);
|
|
||||||
|
|
||||||
static int add_matching_methods (int method_counter, struct type *t,
|
|
||||||
enum language language,
|
|
||||||
- struct symbol **sym_arr);
|
|
||||||
+ struct symbol **sym_arr,
|
|
||||||
+ struct minimal_symbol **msym_arr);
|
|
||||||
|
|
||||||
static int add_constructors (int method_counter, struct type *t,
|
|
||||||
enum language language,
|
|
||||||
@@ -104,6 +108,9 @@ static int is_objc_method_format (const
|
|
||||||
static struct symtabs_and_lines decode_line_2 (struct symbol *[],
|
|
||||||
int, int, char ***);
|
|
||||||
|
|
||||||
+static struct symtabs_and_lines decode_line_3 (struct minimal_symbol *[],
|
|
||||||
+ int, int, char ***);
|
|
||||||
+
|
|
||||||
static struct symtab *symtab_from_filename (char **argptr,
|
|
||||||
char *p, int is_quote_enclosed,
|
|
||||||
int *not_found_ptr);
|
|
||||||
@@ -194,13 +201,18 @@ total_number_of_methods (struct type *ty
|
|
||||||
/* Recursive helper function for decode_line_1.
|
|
||||||
Look for methods named NAME in type T.
|
|
||||||
Return number of matches.
|
|
||||||
- Put matches in SYM_ARR, which should have been allocated with
|
|
||||||
+ Put symbol matches in SYM_ARR, which should have been allocated with
|
|
||||||
a size of total_number_of_methods (T) * sizeof (struct symbol *).
|
|
||||||
+ In a special case where we are looking for constructors, we may
|
|
||||||
+ have to return minimal symbols in the array: MSYM_ARR. This occurs
|
|
||||||
+ when the compiler does not generate mangled names for the constructor's
|
|
||||||
+ debug info because there are multiple versions of the constructor
|
|
||||||
+ (in-charge vs not-in-charge).
|
|
||||||
Note that this function is g++ specific. */
|
|
||||||
|
|
||||||
static int
|
|
||||||
find_methods (struct type *t, char *name, enum language language,
|
|
||||||
- struct symbol **sym_arr)
|
|
||||||
+ struct symbol **sym_arr, struct minimal_symbol **msym_arr)
|
|
||||||
{
|
|
||||||
int i1 = 0;
|
|
||||||
int ibase;
|
|
||||||
@@ -243,7 +255,7 @@ find_methods (struct type *t, char *name
|
|
||||||
if (strcmp_iw (name, method_name) == 0)
|
|
||||||
/* Find all the overloaded methods with that name. */
|
|
||||||
i1 += add_matching_methods (method_counter, t, language,
|
|
||||||
- sym_arr + i1);
|
|
||||||
+ sym_arr + i1, msym_arr);
|
|
||||||
else if (strncmp (class_name, name, name_len) == 0
|
|
||||||
&& (class_name[name_len] == '\0'
|
|
||||||
|| class_name[name_len] == '<'))
|
|
||||||
@@ -266,21 +278,100 @@ find_methods (struct type *t, char *name
|
|
||||||
if (i1 == 0)
|
|
||||||
for (ibase = 0; ibase < TYPE_N_BASECLASSES (t); ibase++)
|
|
||||||
i1 += find_methods (TYPE_BASECLASS (t, ibase), name,
|
|
||||||
- language, sym_arr + i1);
|
|
||||||
+ language, sym_arr + i1, msym_arr);
|
|
||||||
|
|
||||||
return i1;
|
|
||||||
}
|
|
||||||
|
|
||||||
+static int
|
|
||||||
+add_minsym_members (const char *class_name,
|
|
||||||
+ const char *member_name,
|
|
||||||
+ struct minimal_symbol **msym_arr)
|
|
||||||
+{
|
|
||||||
+ char *completion_name;
|
|
||||||
+ char **list;
|
|
||||||
+ int i;
|
|
||||||
+ int comp_len;
|
|
||||||
+ int counter = 0;
|
|
||||||
+
|
|
||||||
+ /* To find the member, we first cheat and use symbol completion.
|
|
||||||
+ This will give us a list of all the member names including
|
|
||||||
+ the function signature. */
|
|
||||||
+ completion_name = xmalloc (strlen (class_name) +
|
|
||||||
+ strlen (member_name) + 9);
|
|
||||||
+ completion_name[0] = '\'';
|
|
||||||
+ strcpy (completion_name+1, class_name);
|
|
||||||
+ /* FIXME: make this the language class separator. */
|
|
||||||
+ strcat (completion_name, "::");
|
|
||||||
+ strcat (completion_name, member_name);
|
|
||||||
+ strcat (completion_name, "(");
|
|
||||||
+ list = make_symbol_completion_list (completion_name,
|
|
||||||
+ completion_name+1);
|
|
||||||
+
|
|
||||||
+ /* Now that we have the list, we generate an array of their
|
|
||||||
+ corresponding minimal symbols. */
|
|
||||||
+ counter = 0;
|
|
||||||
+ while (list && list[counter] != NULL)
|
|
||||||
+ {
|
|
||||||
+ msym_arr[counter] = lookup_minimal_symbol (list[counter], NULL, NULL);
|
|
||||||
+ ++counter;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ xfree (list);
|
|
||||||
+
|
|
||||||
+ /* In the case of constructors, there may be in-charge vs not-in-charge
|
|
||||||
+ constructors. Check for names with $base which indicates not-in-charge
|
|
||||||
+ constructors. */
|
|
||||||
+ comp_len = strlen (completion_name);
|
|
||||||
+ strcpy (completion_name + comp_len - 1, "$base(");
|
|
||||||
+ list = make_symbol_completion_list (completion_name,
|
|
||||||
+ completion_name+1);
|
|
||||||
+
|
|
||||||
+ /* Again we have a list. Add their minimal symbols to the array. */
|
|
||||||
+ i = 0;
|
|
||||||
+ while (list && list[i] != NULL)
|
|
||||||
+ {
|
|
||||||
+ msym_arr[counter] = lookup_minimal_symbol (list[i++], NULL, NULL);
|
|
||||||
+ ++counter;
|
|
||||||
+ }
|
|
||||||
+ xfree (list);
|
|
||||||
+
|
|
||||||
+ /* Target also the allocating/deleting variants. */
|
|
||||||
+ if (member_name[0] == '~')
|
|
||||||
+ strcpy (completion_name + comp_len - 1, "$delete(");
|
|
||||||
+ else
|
|
||||||
+ strcpy (completion_name + comp_len - 1, "$allocate(");
|
|
||||||
+ list = make_symbol_completion_list (completion_name,
|
|
||||||
+ completion_name+1);
|
|
||||||
+
|
|
||||||
+ /* Again we have a list. Add their minimal symbols to the array. */
|
|
||||||
+ i = 0;
|
|
||||||
+ while (list && list[i] != NULL)
|
|
||||||
+ {
|
|
||||||
+ msym_arr[counter] = lookup_minimal_symbol (list[i++], NULL, NULL);
|
|
||||||
+ ++counter;
|
|
||||||
+ }
|
|
||||||
+ xfree (list);
|
|
||||||
+
|
|
||||||
+ xfree (completion_name);
|
|
||||||
+
|
|
||||||
+ return counter;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
/* Add the symbols associated to methods of the class whose type is T
|
|
||||||
and whose name matches the method indexed by METHOD_COUNTER in the
|
|
||||||
array SYM_ARR. Return the number of methods added. */
|
|
||||||
|
|
||||||
static int
|
|
||||||
add_matching_methods (int method_counter, struct type *t,
|
|
||||||
- enum language language, struct symbol **sym_arr)
|
|
||||||
+ enum language language, struct symbol **sym_arr,
|
|
||||||
+ struct minimal_symbol **msym_arr)
|
|
||||||
{
|
|
||||||
int field_counter;
|
|
||||||
int i1 = 0;
|
|
||||||
+ int cons_index = 0;
|
|
||||||
+ char *class_name = type_name_no_tag (t);
|
|
||||||
+ char **list = NULL;
|
|
||||||
|
|
||||||
for (field_counter = TYPE_FN_FIELDLIST_LENGTH (t, method_counter) - 1;
|
|
||||||
field_counter >= 0;
|
|
||||||
@@ -305,6 +396,16 @@ add_matching_methods (int method_counter
|
|
||||||
else
|
|
||||||
phys_name = TYPE_FN_FIELD_PHYSNAME (f, field_counter);
|
|
||||||
|
|
||||||
+ /* Check for special case of looking for member that
|
|
||||||
+ doesn't have a mangled name provided. This will happen
|
|
||||||
+ when we have in-charge and not-in-charge constructors.
|
|
||||||
+ Since we don't have a mangled name to work with, if we
|
|
||||||
+ look for the symbol, we can only find the class itself.
|
|
||||||
+ We can find the information we need in the minimal symbol
|
|
||||||
+ table which has the full member name information we need. */
|
|
||||||
+ if (strlen (phys_name) <= strlen (class_name))
|
|
||||||
+ return add_minsym_members (class_name, phys_name, msym_arr);
|
|
||||||
+
|
|
||||||
/* Destructor is handled by caller, don't add it to
|
|
||||||
the list. */
|
|
||||||
if (is_destructor_name (phys_name) != 0)
|
|
||||||
@@ -330,6 +431,9 @@ add_matching_methods (int method_counter
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
+ if (list)
|
|
||||||
+ xfree (list);
|
|
||||||
+
|
|
||||||
return i1;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -610,6 +714,146 @@ decode_line_2 (struct symbol *sym_arr[],
|
|
||||||
discard_cleanups (old_chain);
|
|
||||||
return return_values;
|
|
||||||
}
|
|
||||||
+
|
|
||||||
+/* Given a list of NELTS minimal symbols in MSYM_ARR, return a list of lines to
|
|
||||||
+ operate on (ask user if necessary).
|
|
||||||
+ If CANONICAL is non-NULL return a corresponding array of mangled names
|
|
||||||
+ as canonical line specs there. */
|
|
||||||
+
|
|
||||||
+static struct symtabs_and_lines
|
|
||||||
+decode_line_3 (struct minimal_symbol *msym_arr[],
|
|
||||||
+ int nelts, int funfirstline,
|
|
||||||
+ char ***canonical)
|
|
||||||
+{
|
|
||||||
+ struct symtabs_and_lines values, return_values;
|
|
||||||
+ char *args, *arg1;
|
|
||||||
+ int i;
|
|
||||||
+ char *prompt;
|
|
||||||
+ char *symname;
|
|
||||||
+ struct cleanup *old_chain;
|
|
||||||
+ char **canonical_arr = (char **) NULL;
|
|
||||||
+
|
|
||||||
+ values.sals = (struct symtab_and_line *)
|
|
||||||
+ alloca (nelts * sizeof (struct symtab_and_line));
|
|
||||||
+ return_values.sals = (struct symtab_and_line *)
|
|
||||||
+ xmalloc (nelts * sizeof (struct symtab_and_line));
|
|
||||||
+ old_chain = make_cleanup (xfree, return_values.sals);
|
|
||||||
+
|
|
||||||
+ if (canonical)
|
|
||||||
+ {
|
|
||||||
+ canonical_arr = (char **) xmalloc (nelts * sizeof (char *));
|
|
||||||
+ make_cleanup (xfree, canonical_arr);
|
|
||||||
+ memset (canonical_arr, 0, nelts * sizeof (char *));
|
|
||||||
+ *canonical = canonical_arr;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ i = 0;
|
|
||||||
+ printf_unfiltered ("[0] cancel\n[1] all\n");
|
|
||||||
+ while (i < nelts)
|
|
||||||
+ {
|
|
||||||
+ init_sal (&return_values.sals[i]); /* Initialize to zeroes. */
|
|
||||||
+ init_sal (&values.sals[i]);
|
|
||||||
+ if (msym_arr[i])
|
|
||||||
+ {
|
|
||||||
+ struct symtabs_and_lines msal = minsym_found (funfirstline,
|
|
||||||
+ msym_arr[i]);
|
|
||||||
+ memcpy (&values.sals[i], &msal.sals[0],
|
|
||||||
+ sizeof (struct symtab_and_line));
|
|
||||||
+ if (values.sals[i].symtab)
|
|
||||||
+ printf_unfiltered ("[%d] %s at %s:%d\n",
|
|
||||||
+ (i + 2),
|
|
||||||
+ SYMBOL_PRINT_NAME (msym_arr[i]),
|
|
||||||
+ values.sals[i].symtab->filename,
|
|
||||||
+ values.sals[i].line);
|
|
||||||
+ else
|
|
||||||
+ printf_unfiltered ("[%d] %s at ?FILE:%d [No symtab? Probably broken debug info...]\n",
|
|
||||||
+ (i + 2),
|
|
||||||
+ SYMBOL_PRINT_NAME (msym_arr[i]),
|
|
||||||
+ values.sals[i].line);
|
|
||||||
+
|
|
||||||
+ }
|
|
||||||
+ else
|
|
||||||
+ printf_unfiltered ("?HERE\n");
|
|
||||||
+ i++;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ prompt = getenv ("PS2");
|
|
||||||
+ if (prompt == NULL)
|
|
||||||
+ {
|
|
||||||
+ prompt = "> ";
|
|
||||||
+ }
|
|
||||||
+ args = command_line_input (prompt, 0, "overload-choice");
|
|
||||||
+
|
|
||||||
+ if (args == 0 || *args == 0)
|
|
||||||
+ error_no_arg ("one or more choice numbers");
|
|
||||||
+
|
|
||||||
+ i = 0;
|
|
||||||
+ while (*args)
|
|
||||||
+ {
|
|
||||||
+ int num;
|
|
||||||
+
|
|
||||||
+ arg1 = args;
|
|
||||||
+ while (*arg1 >= '0' && *arg1 <= '9')
|
|
||||||
+ arg1++;
|
|
||||||
+ if (*arg1 && *arg1 != ' ' && *arg1 != '\t')
|
|
||||||
+ error ("Arguments must be choice numbers.");
|
|
||||||
+
|
|
||||||
+ num = atoi (args);
|
|
||||||
+
|
|
||||||
+ if (num == 0)
|
|
||||||
+ error ("canceled");
|
|
||||||
+ else if (num == 1)
|
|
||||||
+ {
|
|
||||||
+ if (canonical_arr)
|
|
||||||
+ {
|
|
||||||
+ for (i = 0; i < nelts; i++)
|
|
||||||
+ {
|
|
||||||
+ if (canonical_arr[i] == NULL)
|
|
||||||
+ {
|
|
||||||
+ symname = DEPRECATED_SYMBOL_NAME (msym_arr[i]);
|
|
||||||
+ canonical_arr[i] = savestring (symname, strlen (symname));
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ memcpy (return_values.sals, values.sals,
|
|
||||||
+ (nelts * sizeof (struct symtab_and_line)));
|
|
||||||
+ return_values.nelts = nelts;
|
|
||||||
+ discard_cleanups (old_chain);
|
|
||||||
+ return return_values;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ if (num >= nelts + 2)
|
|
||||||
+ {
|
|
||||||
+ printf_unfiltered ("No choice number %d.\n", num);
|
|
||||||
+ }
|
|
||||||
+ else
|
|
||||||
+ {
|
|
||||||
+ num -= 2;
|
|
||||||
+ if (values.sals[num].pc)
|
|
||||||
+ {
|
|
||||||
+ if (canonical_arr)
|
|
||||||
+ {
|
|
||||||
+ symname = DEPRECATED_SYMBOL_NAME (msym_arr[num]);
|
|
||||||
+ make_cleanup (xfree, symname);
|
|
||||||
+ canonical_arr[i] = savestring (symname, strlen (symname));
|
|
||||||
+ }
|
|
||||||
+ return_values.sals[i++] = values.sals[num];
|
|
||||||
+ values.sals[num].pc = 0;
|
|
||||||
+ }
|
|
||||||
+ else
|
|
||||||
+ {
|
|
||||||
+ printf_unfiltered ("duplicate request for %d ignored.\n", num);
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ args = arg1;
|
|
||||||
+ while (*args == ' ' || *args == '\t')
|
|
||||||
+ args++;
|
|
||||||
+ }
|
|
||||||
+ return_values.nelts = i;
|
|
||||||
+ discard_cleanups (old_chain);
|
|
||||||
+ return return_values;
|
|
||||||
+}
|
|
||||||
|
|
||||||
/* The parser of linespec itself. */
|
|
||||||
|
|
||||||
@@ -1414,35 +1658,46 @@ find_method (int funfirstline, char ***c
|
|
||||||
struct symbol **sym_arr = alloca (total_number_of_methods (t)
|
|
||||||
* sizeof (struct symbol *));
|
|
||||||
|
|
||||||
+ struct minimal_symbol **msym_arr = alloca (total_number_of_methods (t)
|
|
||||||
+ * sizeof (struct minimal_symbol *));
|
|
||||||
+
|
|
||||||
+ msym_arr[0] = NULL;
|
|
||||||
+
|
|
||||||
/* Find all methods with a matching name, and put them in
|
|
||||||
sym_arr. */
|
|
||||||
|
|
||||||
- i1 = collect_methods (copy, t, sym_class, sym_arr);
|
|
||||||
+ i1 = collect_methods (copy, t, sym_class, sym_arr, msym_arr);
|
|
||||||
|
|
||||||
if (i1 == 1)
|
|
||||||
{
|
|
||||||
/* There is exactly one field with that name. */
|
|
||||||
- sym = sym_arr[0];
|
|
||||||
-
|
|
||||||
- if (sym && SYMBOL_CLASS (sym) == LOC_BLOCK)
|
|
||||||
- {
|
|
||||||
- values.sals = (struct symtab_and_line *)
|
|
||||||
- xmalloc (sizeof (struct symtab_and_line));
|
|
||||||
- values.nelts = 1;
|
|
||||||
- values.sals[0] = find_function_start_sal (sym,
|
|
||||||
- funfirstline);
|
|
||||||
- }
|
|
||||||
+ if (msym_arr[0] != NULL)
|
|
||||||
+ return minsym_found (funfirstline, msym_arr[0]);
|
|
||||||
else
|
|
||||||
{
|
|
||||||
- values.sals = NULL;
|
|
||||||
- values.nelts = 0;
|
|
||||||
+ sym = sym_arr[0];
|
|
||||||
+
|
|
||||||
+ if (sym && SYMBOL_CLASS (sym) == LOC_BLOCK)
|
|
||||||
+ {
|
|
||||||
+ values.sals = (struct symtab_and_line *)
|
|
||||||
+ xmalloc (sizeof (struct symtab_and_line));
|
|
||||||
+ values.nelts = 1;
|
|
||||||
+ values.sals[0] = find_function_start_sal (sym,
|
|
||||||
+ funfirstline);
|
|
||||||
+ }
|
|
||||||
+ else
|
|
||||||
+ {
|
|
||||||
+ values.nelts = 0;
|
|
||||||
+ }
|
|
||||||
+ return values;
|
|
||||||
}
|
|
||||||
- return values;
|
|
||||||
}
|
|
||||||
if (i1 > 0)
|
|
||||||
{
|
|
||||||
/* There is more than one field with that name
|
|
||||||
(overloaded). Ask the user which one to use. */
|
|
||||||
+ if (msym_arr[0] != NULL)
|
|
||||||
+ return decode_line_3 (msym_arr, i1, funfirstline, canonical);
|
|
||||||
return decode_line_2 (sym_arr, i1, funfirstline, canonical);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
@@ -1469,11 +1722,12 @@ find_method (int funfirstline, char ***c
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Find all methods named COPY in the class whose type is T, and put
|
|
||||||
- them in SYM_ARR. Return the number of methods found. */
|
|
||||||
+ them in SYM_ARR or MSYM_ARR. Return the number of methods found. */
|
|
||||||
|
|
||||||
static int
|
|
||||||
collect_methods (char *copy, struct type *t,
|
|
||||||
- struct symbol *sym_class, struct symbol **sym_arr)
|
|
||||||
+ struct symbol *sym_class, struct symbol **sym_arr,
|
|
||||||
+ struct minimal_symbol **msym_arr)
|
|
||||||
{
|
|
||||||
int i1 = 0; /* Counter for the symbol array. */
|
|
||||||
|
|
||||||
@@ -1495,7 +1749,7 @@ collect_methods (char *copy, struct type
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
- i1 = find_methods (t, copy, SYMBOL_LANGUAGE (sym_class), sym_arr);
|
|
||||||
+ i1 = find_methods (t, copy, SYMBOL_LANGUAGE (sym_class), sym_arr, msym_arr);
|
|
||||||
|
|
||||||
return i1;
|
|
||||||
}
|
|
||||||
--- gdb-6.8/gdb/Makefile.in.orig 2008-08-27 12:59:59.000000000 +0200
|
|
||||||
+++ gdb-6.8/gdb/Makefile.in 2008-08-27 13:00:19.000000000 +0200
|
|
||||||
@@ -2341,7 +2341,8 @@ libunwind-frame.o: libunwind-frame.c $(d
|
|
||||||
linespec.o: linespec.c $(defs_h) $(symtab_h) $(frame_h) $(command_h) \
|
|
||||||
$(symfile_h) $(objfiles_h) $(source_h) $(demangle_h) $(value_h) \
|
|
||||||
$(completer_h) $(cp_abi_h) $(parser_defs_h) $(block_h) \
|
|
||||||
- $(objc_lang_h) $(linespec_h) $(exceptions_h) $(language_h)
|
|
||||||
+ $(objc_lang_h) $(linespec_h) $(exceptions_h) $(language_h) \
|
|
||||||
+ $(gdb_assert_h)
|
|
||||||
linux-fork.o: linux-fork.c $(defs_h) $(inferior_h) $(regcache_h) $(gdbcmd_h) \
|
|
||||||
$(infcall_h) $(gdb_assert_h) $(gdb_string_h) $(linux_fork_h) \
|
|
||||||
$(linux_nat_h) $(gdb_wait_h) $(gdb_dirent_h)
|
|
|
@ -1,130 +1,17 @@
|
||||||
--- /dev/null 2008-05-02 23:36:22.370004160 +0200
|
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||||
+++ gdb-6.8/gdb/testsuite/gdb.base/gcore-shmid0.exp 2008-05-03 22:36:56.000000000 +0200
|
From: Fedora GDB patches <invalid@email.com>
|
||||||
@@ -0,0 +1,120 @@
|
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||||
+# Copyright 2007 Free Software Foundation, Inc.
|
Subject: gdb-6.3-mapping-zero-inode-test.patch
|
||||||
+
|
|
||||||
+# This program is free software; you can redistribute it and/or modify
|
;; Test GCORE for shmid 0 shared memory mappings.
|
||||||
+# it under the terms of the GNU General Public License as published by
|
;;=fedoratest: But it is broken anyway, sometimes the case being tested is not reproducible.
|
||||||
+# the Free Software Foundation; either version 2 of the License, or
|
|
||||||
+# (at your option) any later version.
|
diff --git a/gdb/testsuite/gdb.base/gcore-shmid0.c b/gdb/testsuite/gdb.base/gcore-shmid0.c
|
||||||
+#
|
new file mode 100644
|
||||||
+# This program is distributed in the hope that it will be useful,
|
--- /dev/null
|
||||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
+++ b/gdb/testsuite/gdb.base/gcore-shmid0.c
|
||||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
@@ -0,0 +1,128 @@
|
||||||
+# GNU General Public License for more details.
|
+/* Copyright 2007, 2009 Free Software Foundation, Inc.
|
||||||
+#
|
|
||||||
+# You should have received a copy of the GNU General Public License
|
|
||||||
+# along with this program; if not, write to the Free Software
|
|
||||||
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
+
|
|
||||||
+# Please email any bugs, comments, and/or additions to this file to:
|
|
||||||
+# bug-gdb@prep.ai.mit.edu
|
|
||||||
+
|
|
||||||
+# Test GDB's handling of gcore for mapping with a name but zero inode.
|
|
||||||
+
|
|
||||||
+set testfile "gcore-shmid0"
|
|
||||||
+set srcfile ${testfile}.c
|
|
||||||
+set binfile ${objdir}/${subdir}/${testfile}
|
|
||||||
+
|
|
||||||
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
|
|
||||||
+ untested gcore.exp
|
|
||||||
+ return -1
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+# Start with a fresh gdb.
|
|
||||||
+
|
|
||||||
+gdb_exit
|
|
||||||
+gdb_start
|
|
||||||
+gdb_reinitialize_dir $srcdir/$subdir
|
|
||||||
+gdb_load ${binfile}
|
|
||||||
+
|
|
||||||
+# Does this gdb support gcore?
|
|
||||||
+send_gdb "help gcore\n"
|
|
||||||
+gdb_expect {
|
|
||||||
+ -re "Undefined command: .gcore.*$gdb_prompt $" {
|
|
||||||
+ # gcore command not supported -- nothing to test here.
|
|
||||||
+ unsupported "gdb does not support gcore on this target"
|
|
||||||
+ return -1;
|
|
||||||
+ }
|
|
||||||
+ -re "Save a core file .*$gdb_prompt $" {
|
|
||||||
+ pass "help gcore"
|
|
||||||
+ }
|
|
||||||
+ -re ".*$gdb_prompt $" {
|
|
||||||
+ fail "help gcore"
|
|
||||||
+ }
|
|
||||||
+ timeout {
|
|
||||||
+ fail "help gcore (timeout)"
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+if { ! [ runto_main ] } then {
|
|
||||||
+ untested gcore-shmid0.exp
|
|
||||||
+ return -1
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+gdb_breakpoint "initialized"
|
|
||||||
+gdb_breakpoint "unresolved"
|
|
||||||
+
|
|
||||||
+set test "Continue to initialized."
|
|
||||||
+gdb_test_multiple "continue" $test {
|
|
||||||
+ -re "Breakpoint .*, initialized .* at .*\r\n$gdb_prompt $" {
|
|
||||||
+ pass $test
|
|
||||||
+ }
|
|
||||||
+ -re "Breakpoint .*, unresolved .* at .*\r\n$gdb_prompt $" {
|
|
||||||
+ unsupported $test
|
|
||||||
+ return -1
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+set escapedfilename [string_to_regexp ${objdir}/${subdir}/gcore-shmid0.test]
|
|
||||||
+
|
|
||||||
+set test "save a corefile"
|
|
||||||
+gdb_test_multiple "gcore ${objdir}/${subdir}/gcore-shmid0.test" $test {
|
|
||||||
+ -re "Saved corefile ${escapedfilename}\[\r\n\]+$gdb_prompt $" {
|
|
||||||
+ pass $test
|
|
||||||
+ }
|
|
||||||
+ -re "Can't create a corefile\[\r\n\]+$gdb_prompt $" {
|
|
||||||
+ unsupported $test
|
|
||||||
+ }
|
|
||||||
+ eof {
|
|
||||||
+ fail $test
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+# Be sure to remove the handle first.
|
|
||||||
+# But it would get removed even on a kill by GDB as the handle is already
|
|
||||||
+# deleted, just it is still attached.
|
|
||||||
+gdb_continue_to_end "finish"
|
|
||||||
+
|
|
||||||
+set test "core-file command"
|
|
||||||
+gdb_test_multiple "core-file $objdir/$subdir/gcore-shmid0.test" $test {
|
|
||||||
+ -re ".* program is being debugged already.*y or n. $" {
|
|
||||||
+ # gdb_load may connect us to a gdbserver.
|
|
||||||
+ send_gdb "y\n"
|
|
||||||
+ exp_continue;
|
|
||||||
+ }
|
|
||||||
+ -re "Core was generated by .*\r\n\#0 .*\\\(\\\).*\r\n$gdb_prompt $" {
|
|
||||||
+ # The filename does not fit there anyway so do not check it.
|
|
||||||
+ pass $test
|
|
||||||
+ }
|
|
||||||
+ -re ".*registers from core file: File in wrong format.* $" {
|
|
||||||
+ fail "core-file command (could not read registers from core file)"
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+set test "backtrace"
|
|
||||||
+gdb_test_multiple "bt" $test {
|
|
||||||
+ -re "#0 *initialized \\\(\\\) at .*#1 .* main \\\(.*$gdb_prompt $" {
|
|
||||||
+ pass $test
|
|
||||||
+ }
|
|
||||||
+ -re "#0 *initialized \\\(\\\) at .*Cannot access memory at address .*$gdb_prompt $" {
|
|
||||||
+ fail $test
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
--- /dev/null 2008-05-02 23:36:22.370004160 +0200
|
|
||||||
+++ gdb-6.8/gdb/testsuite/gdb.base/gcore-shmid0.c 2008-05-03 22:39:10.000000000 +0200
|
|
||||||
@@ -0,0 +1,95 @@
|
|
||||||
+/* Copyright 2007 Free Software Foundation, Inc.
|
|
||||||
+
|
+
|
||||||
+ This file is part of GDB.
|
+ This file is part of GDB.
|
||||||
+
|
+
|
||||||
|
@ -154,17 +41,25 @@
|
||||||
+#include <stdlib.h>
|
+#include <stdlib.h>
|
||||||
+#include <unistd.h>
|
+#include <unistd.h>
|
||||||
+#include <assert.h>
|
+#include <assert.h>
|
||||||
|
+#include <time.h>
|
||||||
+
|
+
|
||||||
+/* We need a backtrace through the stack. */
|
+/* The same test running in a parallel testsuite may steal us the zero SID,
|
||||||
|
+ even if we never get any EEXIST. Just try a while. */
|
||||||
|
+
|
||||||
|
+#define TIMEOUT_SEC 10
|
||||||
|
+
|
||||||
|
+static volatile int v;
|
||||||
+
|
+
|
||||||
+static void
|
+static void
|
||||||
+initialized (void)
|
+initialized (void)
|
||||||
+{
|
+{
|
||||||
|
+ v++;
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
+static void
|
+static void
|
||||||
+unresolved (void)
|
+unresolved (void)
|
||||||
+{
|
+{
|
||||||
|
+ v++;
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
+int
|
+int
|
||||||
|
@ -172,19 +67,41 @@
|
||||||
+{
|
+{
|
||||||
+ int sid;
|
+ int sid;
|
||||||
+ unsigned int *addr = (void *) -1L;
|
+ unsigned int *addr = (void *) -1L;
|
||||||
+ int try;
|
+ int attempt, round = 0;
|
||||||
|
+ time_t ts_start, ts;
|
||||||
+
|
+
|
||||||
+ /* The generated SID will cycle with an increment of 32768, try until it
|
+ if (time (&ts_start) == (time_t) -1)
|
||||||
|
+ {
|
||||||
|
+ printf ("time (): %m\n");
|
||||||
|
+ exit (1);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ /* The generated SID will cycle with an increment of 32768, attempt until it
|
||||||
+ * wraps to 0. */
|
+ * wraps to 0. */
|
||||||
+
|
+
|
||||||
+ for (try = 0; addr == (void *) -1L; try++)
|
+ for (attempt = 0; addr == (void *) -1L; attempt++)
|
||||||
+ {
|
+ {
|
||||||
+ /* At least kernel-2.6.25-8.fc9.x86_64 just never returns the value 0 by
|
+ /* kernel-2.6.25-8.fc9.x86_64 just never returns the value 0 by
|
||||||
+ shmget(2). */
|
+ shmget(2). shmget returns SID range 0..1<<31 in steps of 32768,
|
||||||
+ if (try > 0x10000)
|
+ 0x1000 should be enough but wrap the range it to be sure. */
|
||||||
|
+
|
||||||
|
+ if (attempt > 0x21000)
|
||||||
+ {
|
+ {
|
||||||
+ printf ("Problem no longer reproducible on this kernel (try %d)\n",
|
+ if (time (&ts) == (time_t) -1)
|
||||||
+ try);
|
+ {
|
||||||
|
+ printf ("time (): %m\n");
|
||||||
|
+ exit (1);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ if (ts >= ts_start && ts < ts_start + TIMEOUT_SEC)
|
||||||
|
+ {
|
||||||
|
+ attempt = 0;
|
||||||
|
+ round++;
|
||||||
|
+ continue;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ printf ("Problem is not reproducible on this kernel (attempt %d, "
|
||||||
|
+ "round %d)\n", attempt, round);
|
||||||
+ unresolved ();
|
+ unresolved ();
|
||||||
+ exit (1);
|
+ exit (1);
|
||||||
+ }
|
+ }
|
||||||
|
@ -192,6 +109,9 @@
|
||||||
+ sid = shmget ((key_t) rand (), 0x1000, IPC_CREAT | IPC_EXCL | 0777);
|
+ sid = shmget ((key_t) rand (), 0x1000, IPC_CREAT | IPC_EXCL | 0777);
|
||||||
+ if (sid == -1)
|
+ if (sid == -1)
|
||||||
+ {
|
+ {
|
||||||
|
+ if (errno == EEXIST)
|
||||||
|
+ continue;
|
||||||
|
+
|
||||||
+ printf ("shmget (%d, 0x1000, IPC_CREAT): errno %d\n", 0, errno);
|
+ printf ("shmget (%d, 0x1000, IPC_CREAT): errno %d\n", 0, errno);
|
||||||
+ exit (1);
|
+ exit (1);
|
||||||
+ }
|
+ }
|
||||||
|
@ -219,3 +139,109 @@
|
||||||
+
|
+
|
||||||
+ return 0;
|
+ return 0;
|
||||||
+}
|
+}
|
||||||
|
diff --git a/gdb/testsuite/gdb.base/gcore-shmid0.exp b/gdb/testsuite/gdb.base/gcore-shmid0.exp
|
||||||
|
new file mode 100644
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/gdb/testsuite/gdb.base/gcore-shmid0.exp
|
||||||
|
@@ -0,0 +1,101 @@
|
||||||
|
+# Copyright 2007, 2009 Free Software Foundation, Inc.
|
||||||
|
+
|
||||||
|
+# This program is free software; you can redistribute it and/or modify
|
||||||
|
+# it under the terms of the GNU General Public License as published by
|
||||||
|
+# the Free Software Foundation; either version 2 of the License, or
|
||||||
|
+# (at your option) any later version.
|
||||||
|
+#
|
||||||
|
+# This program is distributed in the hope that it will be useful,
|
||||||
|
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
+# GNU General Public License for more details.
|
||||||
|
+#
|
||||||
|
+# You should have received a copy of the GNU General Public License
|
||||||
|
+# along with this program; if not, write to the Free Software
|
||||||
|
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
+
|
||||||
|
+# Test GDB's handling of gcore for mapping with a name but zero inode.
|
||||||
|
+
|
||||||
|
+if { [prepare_for_testing gcore-shmid0.exp gcore-shmid0] } {
|
||||||
|
+ return -1
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+# Does this gdb support gcore?
|
||||||
|
+set test "help gcore"
|
||||||
|
+gdb_test_multiple $test $test {
|
||||||
|
+ -re "Undefined command: .gcore.*$gdb_prompt $" {
|
||||||
|
+ # gcore command not supported -- nothing to test here.
|
||||||
|
+ unsupported "gdb does not support gcore on this target"
|
||||||
|
+ return -1;
|
||||||
|
+ }
|
||||||
|
+ -re "Save a core file .*$gdb_prompt $" {
|
||||||
|
+ pass $test
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+if { ! [ runto_main ] } then {
|
||||||
|
+ untested gcore-shmid0.exp
|
||||||
|
+ return -1
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+gdb_breakpoint "initialized"
|
||||||
|
+gdb_breakpoint "unresolved"
|
||||||
|
+
|
||||||
|
+set oldtimeout $timeout
|
||||||
|
+set timeout [expr $oldtimeout + 120]
|
||||||
|
+
|
||||||
|
+set test "Continue to initialized."
|
||||||
|
+gdb_test_multiple "continue" $test {
|
||||||
|
+ -re "Breakpoint .*, initialized .* at .*\r\n$gdb_prompt $" {
|
||||||
|
+ pass $test
|
||||||
|
+ }
|
||||||
|
+ -re "Breakpoint .*, unresolved .* at .*\r\n$gdb_prompt $" {
|
||||||
|
+ set timeout $oldtimeout
|
||||||
|
+ unsupported $test
|
||||||
|
+ return -1
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+set timeout $oldtimeout
|
||||||
|
+
|
||||||
|
+set escapedfilename [string_to_regexp [standard_output_file gcore-shmid0.test]]
|
||||||
|
+
|
||||||
|
+set test "save a corefile"
|
||||||
|
+gdb_test_multiple "gcore [standard_output_file gcore-shmid0.test]" $test {
|
||||||
|
+ -re "Saved corefile ${escapedfilename}\[\r\n\]+$gdb_prompt $" {
|
||||||
|
+ pass $test
|
||||||
|
+ }
|
||||||
|
+ -re "Can't create a corefile\[\r\n\]+$gdb_prompt $" {
|
||||||
|
+ unsupported $test
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+# Be sure to remove the handle first.
|
||||||
|
+# But it would get removed even on a kill by GDB as the handle is already
|
||||||
|
+# deleted, just it is still attached.
|
||||||
|
+gdb_continue_to_end "finish"
|
||||||
|
+
|
||||||
|
+set test "core-file command"
|
||||||
|
+gdb_test_multiple "core-file [standard_output_file gcore-shmid0.test]" $test {
|
||||||
|
+ -re ".* program is being debugged already.*y or n. $" {
|
||||||
|
+ # gdb_load may connect us to a gdbserver.
|
||||||
|
+ send_gdb "y\n"
|
||||||
|
+ exp_continue;
|
||||||
|
+ }
|
||||||
|
+ -re "Core was generated by .*\r\n\#0 .*\\\(\\\).*\r\n$gdb_prompt $" {
|
||||||
|
+ # The filename does not fit there anyway so do not check it.
|
||||||
|
+ pass $test
|
||||||
|
+ }
|
||||||
|
+ -re ".*registers from core file: File in wrong format.* $" {
|
||||||
|
+ fail "core-file command (could not read registers from core file)"
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+set test "backtrace"
|
||||||
|
+gdb_test_multiple "bt" $test {
|
||||||
|
+ -re "#0 *initialized \\\(\\\) at .*#1 .* main \\\(.*$gdb_prompt $" {
|
||||||
|
+ pass $test
|
||||||
|
+ }
|
||||||
|
+ -re "#0 *initialized \\\(\\\) at .*Cannot access memory at address .*$gdb_prompt $" {
|
||||||
|
+ fail $test
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
|
|
@ -1,119 +0,0 @@
|
||||||
[base]
|
|
||||||
|
|
||||||
2007-10-13 Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
||||||
|
|
||||||
* linux-nat.c (iterate_over_lwps): Fixed missing LWP initialization for
|
|
||||||
current INFERIOR_PTID.
|
|
||||||
|
|
||||||
2007-10-13 Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
||||||
|
|
||||||
* gdb.base/follow-child.exp, gdb.base/follow-child.c: New files.
|
|
||||||
|
|
||||||
2007-10-16 Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
||||||
|
|
||||||
Port to GDB-6.7.
|
|
||||||
|
|
||||||
2008-02-24 Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
||||||
|
|
||||||
Port to GDB-6.8pre.
|
|
||||||
|
|
||||||
2008-08-25 Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
||||||
|
|
||||||
Remove the fix as causing an assertion failure for
|
|
||||||
gdb.base/checkpoint.exp and it is no longer needed for
|
|
||||||
gdb.base/follow-child.exp .
|
|
||||||
|
|
||||||
Index: gdb-6.8cvs20080219/gdb/testsuite/gdb.base/follow-child.c
|
|
||||||
===================================================================
|
|
||||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
|
||||||
+++ gdb-6.8cvs20080219/gdb/testsuite/gdb.base/follow-child.c 2008-02-22 08:14:04.000000000 +0100
|
|
||||||
@@ -0,0 +1,29 @@
|
|
||||||
+/* This testcase is part of GDB, the GNU debugger.
|
|
||||||
+
|
|
||||||
+ Copyright 2007 Free Software Foundation, Inc.
|
|
||||||
+
|
|
||||||
+ This program is free software; you can redistribute it and/or modify
|
|
||||||
+ it under the terms of the GNU General Public License as published by
|
|
||||||
+ the Free Software Foundation; either version 2 of the License, or
|
|
||||||
+ (at your option) any later version.
|
|
||||||
+
|
|
||||||
+ This program is distributed in the hope that it will be useful,
|
|
||||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
+ GNU General Public License for more details.
|
|
||||||
+
|
|
||||||
+ You should have received a copy of the GNU General Public License
|
|
||||||
+ along with this program; if not, write to the Free Software
|
|
||||||
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
+
|
|
||||||
+ Please email any bugs, comments, and/or additions to this file to:
|
|
||||||
+ bug-gdb@prep.ai.mit.edu */
|
|
||||||
+
|
|
||||||
+#include <unistd.h>
|
|
||||||
+
|
|
||||||
+int main()
|
|
||||||
+{
|
|
||||||
+ fork ();
|
|
||||||
+ sleep (60);
|
|
||||||
+ return 0;
|
|
||||||
+}
|
|
||||||
Index: gdb-6.8cvs20080219/gdb/testsuite/gdb.base/follow-child.exp
|
|
||||||
===================================================================
|
|
||||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
|
||||||
+++ gdb-6.8cvs20080219/gdb/testsuite/gdb.base/follow-child.exp 2008-02-22 08:14:17.000000000 +0100
|
|
||||||
@@ -0,0 +1,55 @@
|
|
||||||
+# Copyright 2007 Free Software Foundation, Inc.
|
|
||||||
+
|
|
||||||
+# This program is free software; you can redistribute it and/or modify
|
|
||||||
+# it under the terms of the GNU General Public License as published by
|
|
||||||
+# the Free Software Foundation; either version 2 of the License, or
|
|
||||||
+# (at your option) any later version.
|
|
||||||
+#
|
|
||||||
+# This program is distributed in the hope that it will be useful,
|
|
||||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
+# GNU General Public License for more details.
|
|
||||||
+#
|
|
||||||
+# You should have received a copy of the GNU General Public License
|
|
||||||
+# along with this program; if not, write to the Free Software
|
|
||||||
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
+
|
|
||||||
+if $tracelevel then {
|
|
||||||
+ strace $tracelevel
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+set prms_id 0
|
|
||||||
+set bug_id 0
|
|
||||||
+
|
|
||||||
+set testfile follow-child
|
|
||||||
+set srcfile ${testfile}.c
|
|
||||||
+set binfile ${objdir}/${subdir}/${testfile}
|
|
||||||
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
|
|
||||||
+ untested "Couldn't compile test program"
|
|
||||||
+ return -1
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+# Get things started.
|
|
||||||
+
|
|
||||||
+gdb_exit
|
|
||||||
+gdb_start
|
|
||||||
+gdb_reinitialize_dir $srcdir/$subdir
|
|
||||||
+gdb_load ${binfile}
|
|
||||||
+
|
|
||||||
+# For C programs, "start" should stop in main().
|
|
||||||
+
|
|
||||||
+gdb_test "set follow-fork-mode child" ""
|
|
||||||
+set test "started"
|
|
||||||
+# GDB_RUN_CMD already checks for `Starting program:'.
|
|
||||||
+gdb_run_cmd
|
|
||||||
+sleep 5
|
|
||||||
+send_gdb "\003"
|
|
||||||
+set test "break"
|
|
||||||
+gdb_test_multiple "" $test {
|
|
||||||
+ -re "Program received signal SIGINT.*$gdb_prompt $" {
|
|
||||||
+ pass $test
|
|
||||||
+ }
|
|
||||||
+ -re "\\\[New process \[0-9\]+\\\]" {
|
|
||||||
+ fail $test
|
|
||||||
+ }
|
|
||||||
+}
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,28 +0,0 @@
|
||||||
2004-11-24 Andrew Cagney <cagney@gnu.org>
|
|
||||||
|
|
||||||
* printcmd.c (build_address_symbolic): Find a section for the
|
|
||||||
address.
|
|
||||||
|
|
||||||
--- ./gdb/printcmd.c.1 2004-11-24 17:54:27.316295608 -0500
|
|
||||||
+++ ./gdb/printcmd.c 2004-11-24 17:59:20.069790312 -0500
|
|
||||||
@@ -615,6 +615,20 @@
|
|
||||||
addr = overlay_mapped_address (addr, section);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
+ /* To ensure that the symbol returned belongs to the correct setion
|
|
||||||
+ (and that the last [random] symbol from the previous section
|
|
||||||
+ isn't returned) try to find the section containing PC. First try
|
|
||||||
+ the overlay code (which by default returns NULL); and second try
|
|
||||||
+ the normal section code (which almost always succeeds). */
|
|
||||||
+ section = find_pc_overlay (addr);
|
|
||||||
+ if (section == NULL)
|
|
||||||
+ {
|
|
||||||
+ struct obj_section *obj_section = find_pc_section (addr);
|
|
||||||
+ if (obj_section == NULL)
|
|
||||||
+ section = NULL;
|
|
||||||
+ else
|
|
||||||
+ section = obj_section->the_bfd_section;
|
|
||||||
+ }
|
|
||||||
|
|
||||||
/* First try to find the address in the symbol table, then
|
|
||||||
in the minsyms. Take the closest one. */
|
|
|
@ -1,110 +0,0 @@
|
||||||
2004-06-22 Andrew Cagney <cagney@gnu.org>
|
|
||||||
|
|
||||||
* rs6000-tdep.c (struct rs6000_framedata): Add field "func_start".
|
|
||||||
(skip_prologue): Delete local variable "orig_pc", use
|
|
||||||
"func_start". Add local variable "num_skip_linux_syscall_insn",
|
|
||||||
use to skip over first half of a GNU/Linux syscall and update
|
|
||||||
"func_start".
|
|
||||||
|
|
||||||
Index: gdb-6.8/gdb/rs6000-tdep.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.8.orig/gdb/rs6000-tdep.c 2008-02-20 15:34:43.000000000 +0100
|
|
||||||
+++ gdb-6.8/gdb/rs6000-tdep.c 2008-07-14 10:25:29.000000000 +0200
|
|
||||||
@@ -124,6 +124,7 @@ static const char *powerpc_vector_abi_st
|
|
||||||
|
|
||||||
struct rs6000_framedata
|
|
||||||
{
|
|
||||||
+ CORE_ADDR func_start; /* True function start. */
|
|
||||||
int offset; /* total size of frame --- the distance
|
|
||||||
by which we decrement sp to allocate
|
|
||||||
the frame */
|
|
||||||
@@ -1262,7 +1263,6 @@ static CORE_ADDR
|
|
||||||
skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR lim_pc,
|
|
||||||
struct rs6000_framedata *fdata)
|
|
||||||
{
|
|
||||||
- CORE_ADDR orig_pc = pc;
|
|
||||||
CORE_ADDR last_prologue_pc = pc;
|
|
||||||
CORE_ADDR li_found_pc = 0;
|
|
||||||
gdb_byte buf[4];
|
|
||||||
@@ -1280,11 +1280,13 @@ skip_prologue (struct gdbarch *gdbarch,
|
|
||||||
int minimal_toc_loaded = 0;
|
|
||||||
int prev_insn_was_prologue_insn = 1;
|
|
||||||
int num_skip_non_prologue_insns = 0;
|
|
||||||
+ int num_skip_ppc64_gnu_linux_syscall_insn = 0;
|
|
||||||
int r0_contains_arg = 0;
|
|
||||||
const struct bfd_arch_info *arch_info = gdbarch_bfd_arch_info (gdbarch);
|
|
||||||
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
|
|
||||||
|
|
||||||
memset (fdata, 0, sizeof (struct rs6000_framedata));
|
|
||||||
+ fdata->func_start = pc;
|
|
||||||
fdata->saved_gpr = -1;
|
|
||||||
fdata->saved_fpr = -1;
|
|
||||||
fdata->saved_vr = -1;
|
|
||||||
@@ -1313,6 +1315,55 @@ skip_prologue (struct gdbarch *gdbarch,
|
|
||||||
break;
|
|
||||||
op = extract_unsigned_integer (buf, 4);
|
|
||||||
|
|
||||||
+ /* A PPC64 GNU/Linux system call function is split into two
|
|
||||||
+ sub-functions: a non-threaded fast-path (__NAME_nocancel)
|
|
||||||
+ which does not use a frame; and a threaded slow-path
|
|
||||||
+ (Lpseudo_cancel) that does create a frame. Ref:
|
|
||||||
+ nptl/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
|
|
||||||
+
|
|
||||||
+ *INDENT-OFF*
|
|
||||||
+ NAME:
|
|
||||||
+ SINGLE_THREAD_P
|
|
||||||
+ bne- .Lpseudo_cancel
|
|
||||||
+ __NAME_nocancel:
|
|
||||||
+ li r0,162
|
|
||||||
+ sc
|
|
||||||
+ bnslr+
|
|
||||||
+ b 0x7fe014ef64 <.__syscall_error>
|
|
||||||
+ Lpseudo_cancel:
|
|
||||||
+ stdu r1,-128(r1)
|
|
||||||
+ ...
|
|
||||||
+ *INDENT-ON*
|
|
||||||
+
|
|
||||||
+ Unfortunatly, because the latter case uses a local label (not
|
|
||||||
+ in the symbol table) a PC in "Lpseudo_cancel" appears to be
|
|
||||||
+ in "__NAME_nocancel". The following code recognizes this,
|
|
||||||
+ adjusting FUNC_START to point to where "Lpseudo_cancel"
|
|
||||||
+ should be, and parsing the prologue sequence as if
|
|
||||||
+ "Lpseudo_cancel" was the entry point. */
|
|
||||||
+
|
|
||||||
+ if (((op & 0xffff0000) == 0x38000000 /* li r0,N */
|
|
||||||
+ && pc == fdata->func_start + 0
|
|
||||||
+ && num_skip_ppc64_gnu_linux_syscall_insn == 0)
|
|
||||||
+ || (op == 0x44000002 /* sc */
|
|
||||||
+ && pc == fdata->func_start + 4
|
|
||||||
+ && num_skip_ppc64_gnu_linux_syscall_insn == 1)
|
|
||||||
+ || (op == 0x4ca30020 /* bnslr+ */
|
|
||||||
+ && pc == fdata->func_start + 8
|
|
||||||
+ && num_skip_ppc64_gnu_linux_syscall_insn == 2))
|
|
||||||
+ {
|
|
||||||
+ num_skip_ppc64_gnu_linux_syscall_insn++;
|
|
||||||
+ continue;
|
|
||||||
+ }
|
|
||||||
+ else if ((op & 0xfc000003) == 0x48000000 /* b __syscall_error */
|
|
||||||
+ && pc == fdata->func_start + 12
|
|
||||||
+ && num_skip_ppc64_gnu_linux_syscall_insn == 3)
|
|
||||||
+ {
|
|
||||||
+ num_skip_ppc64_gnu_linux_syscall_insn = -1;
|
|
||||||
+ fdata->func_start = pc;
|
|
||||||
+ continue;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
if ((op & 0xfc1fffff) == 0x7c0802a6)
|
|
||||||
{ /* mflr Rx */
|
|
||||||
/* Since shared library / PIC code, which needs to get its
|
|
||||||
@@ -1486,9 +1537,9 @@ skip_prologue (struct gdbarch *gdbarch,
|
|
||||||
we have no line table information or the line info tells
|
|
||||||
us that the subroutine call is not part of the line
|
|
||||||
associated with the prologue. */
|
|
||||||
- if ((pc - orig_pc) > 8)
|
|
||||||
+ if ((pc - fdata->func_start) > 8)
|
|
||||||
{
|
|
||||||
- struct symtab_and_line prologue_sal = find_pc_line (orig_pc, 0);
|
|
||||||
+ struct symtab_and_line prologue_sal = find_pc_line (fdata->func_start, 0);
|
|
||||||
struct symtab_and_line this_sal = find_pc_line (pc, 0);
|
|
||||||
|
|
||||||
if ((prologue_sal.line == 0) || (prologue_sal.line != this_sal.line))
|
|
|
@ -1,31 +0,0 @@
|
||||||
2004-10-22 Andrew Cagney <cagney@gnu.org>
|
|
||||||
|
|
||||||
* solib-svr4.c (enable_break): Convert a symbol descriptor into
|
|
||||||
the corresponding function entry point.
|
|
||||||
(solib_break_names): Delete "._dl_debug_state", no longer needed.
|
|
||||||
|
|
||||||
2007-10-12 Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
||||||
|
|
||||||
Port to GDB-6.7.
|
|
||||||
|
|
||||||
Index: gdb-6.7/gdb/solib-svr4.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.7.orig/gdb/solib-svr4.c 2007-10-09 20:03:30.000000000 +0200
|
|
||||||
+++ gdb-6.7/gdb/solib-svr4.c 2007-10-12 22:34:03.000000000 +0200
|
|
||||||
@@ -1089,7 +1089,15 @@ enable_break (void)
|
|
||||||
{
|
|
||||||
sym_addr = bfd_lookup_symbol (tmp_bfd, *bkpt_namep);
|
|
||||||
if (sym_addr != 0)
|
|
||||||
- break;
|
|
||||||
+ {
|
|
||||||
+ /* The symbol might be a descriptor, convert to into the
|
|
||||||
+ corresponding code address. */
|
|
||||||
+ sym_addr = gdbarch_convert_from_func_ptr_addr (current_gdbarch,
|
|
||||||
+ sym_addr,
|
|
||||||
+ tmp_bfd_target);
|
|
||||||
+ if (sym_addr != 0)
|
|
||||||
+ break;
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
|
|
||||||
if (sym_addr != 0)
|
|
|
@ -1,96 +0,0 @@
|
||||||
2004-11-18 Andrew Cagney <cagney@gnu.org>
|
|
||||||
|
|
||||||
* dwarf2read.c: Include "top.c".
|
|
||||||
(dwarf2_has_info): Check for readnever_symbol_files.
|
|
||||||
* symfile.c (readnever_symbol_files): Define.
|
|
||||||
* top.h (readnever_symbol_files): Declare.
|
|
||||||
* main.c (captured_main): Add --readnever option.
|
|
||||||
(print_gdb_help): Ditto.
|
|
||||||
|
|
||||||
2004-11-18 Andrew Cagney <cagney@gnu.org>
|
|
||||||
|
|
||||||
* gdb.texinfo (File Options): Document --readnever.
|
|
||||||
|
|
||||||
Index: gdb-6.8/gdb/doc/gdb.texinfo
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.8.orig/gdb/doc/gdb.texinfo 2008-03-26 19:38:21.000000000 +0100
|
|
||||||
+++ gdb-6.8/gdb/doc/gdb.texinfo 2008-07-14 10:27:01.000000000 +0200
|
|
||||||
@@ -983,6 +983,12 @@ Read each symbol file's entire symbol ta
|
|
||||||
the default, which is to read it incrementally as it is needed.
|
|
||||||
This makes startup slower, but makes future operations faster.
|
|
||||||
|
|
||||||
+@item --readnever
|
|
||||||
+@cindex @code{--readnever}
|
|
||||||
+Do not read each symbol file's symbolic debug information. This makes
|
|
||||||
+startup faster but at the expense of not being able to perform
|
|
||||||
+symbolic debugging.
|
|
||||||
+
|
|
||||||
@end table
|
|
||||||
|
|
||||||
@node Mode Options
|
|
||||||
Index: gdb-6.8/gdb/main.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.8.orig/gdb/main.c 2008-07-14 10:26:39.000000000 +0200
|
|
||||||
+++ gdb-6.8/gdb/main.c 2008-07-14 10:27:01.000000000 +0200
|
|
||||||
@@ -296,6 +296,7 @@ captured_main (void *data)
|
|
||||||
{"xdb", no_argument, &xdb_commands, 1},
|
|
||||||
{"dbx", no_argument, &dbx_commands, 1},
|
|
||||||
{"readnow", no_argument, &readnow_symbol_files, 1},
|
|
||||||
+ {"readnever", no_argument, &readnever_symbol_files, 1},
|
|
||||||
{"r", no_argument, &readnow_symbol_files, 1},
|
|
||||||
{"quiet", no_argument, &quiet, 1},
|
|
||||||
{"q", no_argument, &quiet, 1},
|
|
||||||
@@ -947,6 +948,7 @@ Options:\n\n\
|
|
||||||
fputs_unfiltered (_(" file.\n\
|
|
||||||
--quiet Do not print version number on startup.\n\
|
|
||||||
--readnow Fully read symbol files on first access.\n\
|
|
||||||
+ --readnever Do not read symbol files.\n\
|
|
||||||
"), stream);
|
|
||||||
fputs_unfiltered (_("\
|
|
||||||
--se=FILE Use FILE as symbol file and executable file.\n\
|
|
||||||
Index: gdb-6.8/gdb/symfile.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.8.orig/gdb/symfile.c 2008-07-14 10:26:30.000000000 +0200
|
|
||||||
+++ gdb-6.8/gdb/symfile.c 2008-07-14 10:27:01.000000000 +0200
|
|
||||||
@@ -76,6 +76,7 @@ static void clear_symtab_users_cleanup (
|
|
||||||
|
|
||||||
/* Global variables owned by this file */
|
|
||||||
int readnow_symbol_files; /* Read full symbols immediately */
|
|
||||||
+int readnever_symbol_files; /* Never read full symbols. */
|
|
||||||
|
|
||||||
/* External variables and functions referenced. */
|
|
||||||
|
|
||||||
Index: gdb-6.8/gdb/dwarf2read.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.8.orig/gdb/dwarf2read.c 2008-07-14 10:26:09.000000000 +0200
|
|
||||||
+++ gdb-6.8/gdb/dwarf2read.c 2008-07-14 10:27:01.000000000 +0200
|
|
||||||
@@ -43,6 +43,7 @@
|
|
||||||
#include "dwarf2loc.h"
|
|
||||||
#include "cp-support.h"
|
|
||||||
#include "hashtab.h"
|
|
||||||
+#include "top.h"
|
|
||||||
#include "command.h"
|
|
||||||
#include "gdbcmd.h"
|
|
||||||
|
|
||||||
@@ -1106,7 +1107,8 @@ dwarf2_has_info (struct objfile *objfile
|
|
||||||
dwarf_loc_section = 0;
|
|
||||||
|
|
||||||
bfd_map_over_sections (objfile->obfd, dwarf2_locate_sections, NULL);
|
|
||||||
- return (dwarf_info_section != NULL && dwarf_abbrev_section != NULL);
|
|
||||||
+ return (!readnever_symbol_files
|
|
||||||
+ && dwarf_info_section != NULL && dwarf_abbrev_section != NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* This function is mapped across the sections and remembers the
|
|
||||||
Index: gdb-6.8/gdb/top.h
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.8.orig/gdb/top.h 2008-01-01 23:53:13.000000000 +0100
|
|
||||||
+++ gdb-6.8/gdb/top.h 2008-07-14 10:27:01.000000000 +0200
|
|
||||||
@@ -59,6 +59,7 @@ extern void set_prompt (char *);
|
|
||||||
|
|
||||||
/* From random places. */
|
|
||||||
extern int readnow_symbol_files;
|
|
||||||
+extern int readnever_symbol_files;
|
|
||||||
|
|
||||||
/* Perform _initialize initialization */
|
|
||||||
extern void gdb_init (char *);
|
|
|
@ -1,29 +0,0 @@
|
||||||
2004-11-30 Jeff Johnston <jjohnstn@redhat.com>
|
|
||||||
|
|
||||||
* breakpoint.c (remove_breakpoints): Continue removing breakpoints
|
|
||||||
even if an error occurs. Remove a failure code for the last failure
|
|
||||||
only.
|
|
||||||
|
|
||||||
--- gdb+dejagnu-20040607/gdb/breakpoint.c.fix2 Tue Nov 30 18:01:33 2004
|
|
||||||
+++ gdb+dejagnu-20040607/gdb/breakpoint.c Tue Nov 30 18:06:01 2004
|
|
||||||
@@ -1297,6 +1297,7 @@ remove_breakpoints (void)
|
|
||||||
{
|
|
||||||
struct bp_location *b;
|
|
||||||
int val;
|
|
||||||
+ int return_val = 0;
|
|
||||||
|
|
||||||
ALL_BP_LOCATIONS (b)
|
|
||||||
{
|
|
||||||
@@ -1304,10 +1305,10 @@ remove_breakpoints (void)
|
|
||||||
{
|
|
||||||
val = remove_breakpoint (b, mark_uninserted);
|
|
||||||
if (val != 0)
|
|
||||||
- return val;
|
|
||||||
+ return_val = val;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
- return 0;
|
|
||||||
+ return return_val;
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
|
|
@ -1,22 +0,0 @@
|
||||||
2003-07-11 Elena Zannoni <ezannoni@redhat.com>
|
|
||||||
|
|
||||||
* lib/gdb.exp (setup_kfail, kfail): Redefine procedures.
|
|
||||||
|
|
||||||
--- ./gdb/testsuite/lib/gdb.exp.1 2004-11-24 15:59:46.131394720 -0500
|
|
||||||
+++ ./gdb/testsuite/lib/gdb.exp 2004-11-24 16:01:06.304206600 -0500
|
|
||||||
@@ -63,6 +63,15 @@
|
|
||||||
|
|
||||||
### Only procedures should come after this point.
|
|
||||||
|
|
||||||
+if {![llength [info procs kfail]]} {
|
|
||||||
+ proc setup_kfail { args } {
|
|
||||||
+ #setup_xfail args
|
|
||||||
+ }
|
|
||||||
+ proc kfail { bugid message } {
|
|
||||||
+ fail $message
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
#
|
|
||||||
# gdb_version -- extract and print the version number of GDB
|
|
||||||
#
|
|
|
@ -1,76 +0,0 @@
|
||||||
2003-11-17 Elena Zannoni <ezannoni@redhat.com>
|
|
||||||
|
|
||||||
From Jeff Johnston <jjohnstn@redhat.com>
|
|
||||||
* gdb.arch/ia64-libunwind.exp: New file.
|
|
||||||
* gdb.arch/ia64-libunwind.c: New file.
|
|
||||||
|
|
||||||
--- /dev/null Thu Apr 11 10:25:15 2002
|
|
||||||
+++ gdb+dejagnu-20040223/gdb/testsuite/gdb.arch/ia64-libunwind.exp Mon Nov 17 15:57:04 2003
|
|
||||||
@@ -0,0 +1,55 @@
|
|
||||||
+# Copyright 2003 Free Software Foundation, Inc.
|
|
||||||
+
|
|
||||||
+# This program is free software; you can redistribute it and/or modify
|
|
||||||
+# it under the terms of the GNU General Public License as published by
|
|
||||||
+# the Free Software Foundation; either version 2 of the License, or
|
|
||||||
+# (at your option) any later version.
|
|
||||||
+#
|
|
||||||
+# This program is distributed in the hope that it will be useful,
|
|
||||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
+# GNU General Public License for more details.
|
|
||||||
+#
|
|
||||||
+# You should have received a copy of the GNU General Public License
|
|
||||||
+# along with this program; if not, write to the Free Software
|
|
||||||
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
+
|
|
||||||
+# Please email any bugs, comments, and/or additions to this file to:
|
|
||||||
+# bug-gdb@prep.ai.mit.edu
|
|
||||||
+
|
|
||||||
+# This file was written by Jeff Johnston (jjohnstn@redhat.com)
|
|
||||||
+
|
|
||||||
+if $tracelevel then {
|
|
||||||
+ strace $tracelevel
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+#
|
|
||||||
+# test running programs
|
|
||||||
+#
|
|
||||||
+set prms_id 0
|
|
||||||
+set bug_id 0
|
|
||||||
+
|
|
||||||
+if ![istarget "ia64-*-*"] then {
|
|
||||||
+ return
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+set testfile "ia64-libunwind"
|
|
||||||
+set srcfile ${testfile}.c
|
|
||||||
+set binfile ${objdir}/${subdir}/${testfile}
|
|
||||||
+
|
|
||||||
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-w}] != "" } {
|
|
||||||
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+if [get_compiler_info ${binfile}] {
|
|
||||||
+ return -1
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+gdb_exit
|
|
||||||
+gdb_start
|
|
||||||
+gdb_reinitialize_dir $srcdir/$subdir
|
|
||||||
+gdb_load ${binfile}
|
|
||||||
+send_gdb "set debug arch 1\n"
|
|
||||||
+send_gdb "break main\n"
|
|
||||||
+gdb_test "run" ".*acquire_unwind_info.*"
|
|
||||||
+
|
|
||||||
--- /dev/null Thu Apr 11 10:25:15 2002
|
|
||||||
+++ gdb+dejagnu-20040223/gdb/testsuite/gdb.arch/ia64-libunwind.c Mon Nov 17 15:58:27 2003
|
|
||||||
@@ -0,0 +1,9 @@
|
|
||||||
+#include <stdio.h>
|
|
||||||
+
|
|
||||||
+int main()
|
|
||||||
+{
|
|
||||||
+ printf ("hello world\n");
|
|
||||||
+
|
|
||||||
+ return 0;
|
|
||||||
+}
|
|
||||||
+
|
|
|
@ -1,14 +0,0 @@
|
||||||
2004-08-03 Jeff Johnston <jjohnstn@redhat.com>
|
|
||||||
|
|
||||||
* gdb.arch/ia64-libunwind.exp: Fix test string to match
|
|
||||||
current code base.
|
|
||||||
|
|
||||||
--- gdb+dejagnu-20040607/gdb/testsuite/gdb.arch/ia64-libunwind.exp.fix Tue Aug 3 18:29:22 2004
|
|
||||||
+++ gdb+dejagnu-20040607/gdb/testsuite/gdb.arch/ia64-libunwind.exp Tue Aug 3 18:41:01 2004
|
|
||||||
@@ -51,5 +51,5 @@ gdb_reinitialize_dir $srcdir/$subdir
|
|
||||||
gdb_load ${binfile}
|
|
||||||
send_gdb "set debug arch 1\n"
|
|
||||||
send_gdb "break main\n"
|
|
||||||
-gdb_test "run" ".*acquire_unwind_info.*"
|
|
||||||
+gdb_test "run" ".*ia64_find_proc_info_x.*"
|
|
||||||
|
|
|
@ -1,19 +1,38 @@
|
||||||
|
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||||
|
From: Elena Zannoni <ezannoni@redhat.com>
|
||||||
|
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||||
|
Subject: gdb-6.3-rh-testversion-20041202.patch
|
||||||
|
|
||||||
|
;; Match the Fedora's version info.
|
||||||
|
;;=fedora
|
||||||
|
|
||||||
2003-02-24 Elena Zannoni <ezannoni@redhat.com>
|
2003-02-24 Elena Zannoni <ezannoni@redhat.com>
|
||||||
|
|
||||||
* gdb.gdb/selftest.exp: Add matching on specific Red Hat only version
|
* gdb.gdb/selftest.exp: Add matching on specific Red Hat only version
|
||||||
string.
|
string.
|
||||||
|
|
||||||
Index: gdb-6.8/gdb/testsuite/gdb.gdb/selftest.exp
|
diff --git a/gdb/testsuite/gdb.gdb/selftest.exp b/gdb/testsuite/gdb.gdb/selftest.exp
|
||||||
===================================================================
|
--- a/gdb/testsuite/gdb.gdb/selftest.exp
|
||||||
--- gdb-6.8.orig/gdb/testsuite/gdb.gdb/selftest.exp 2008-01-26 14:56:37.000000000 +0100
|
+++ b/gdb/testsuite/gdb.gdb/selftest.exp
|
||||||
+++ gdb-6.8/gdb/testsuite/gdb.gdb/selftest.exp 2008-07-14 10:23:50.000000000 +0200
|
@@ -53,6 +53,9 @@ proc test_with_self { } {
|
||||||
@@ -354,6 +354,9 @@ proc test_with_self { executable } {
|
|
||||||
-re ".\[0-9\]+ = +.+ +0x.*\[0-9.\]+.*$gdb_prompt $" {
|
-re ".\[0-9\]+ = +.+ +0x.*\[0-9.\]+.*$gdb_prompt $" {
|
||||||
pass "printed version with cast"
|
pass "printed version with cast"
|
||||||
}
|
}
|
||||||
+ -re ".\[0-9\]+ = .Fedora \[\\(\\)0-9.a-z\\-\]+.*$gdb_prompt $" {
|
+ -re ".\[0-9\]+ = .(Fedora|Red Hat Enterprise Linux) \[\\(\\)0-9.a-z\\-\]+.*$gdb_prompt $" {
|
||||||
+ pass "printed version Fedora only"
|
+ pass "printed version Fedora or Red Hat Enterprise Linux only"
|
||||||
+ }
|
+ }
|
||||||
-re ".*$gdb_prompt $" { fail "printed version" }
|
}
|
||||||
timeout { fail "(timeout) printed version" }
|
|
||||||
|
# start the "xgdb" process
|
||||||
|
diff --git a/gdb/top.c b/gdb/top.c
|
||||||
|
--- a/gdb/top.c
|
||||||
|
+++ b/gdb/top.c
|
||||||
|
@@ -2163,7 +2163,7 @@ init_gdb_version_vars (void)
|
||||||
|
struct internalvar *major_version_var = create_internalvar ("_gdb_major");
|
||||||
|
struct internalvar *minor_version_var = create_internalvar ("_gdb_minor");
|
||||||
|
int vmajor = 0, vminor = 0, vrevision = 0;
|
||||||
|
- sscanf (version, "%d.%d.%d", &vmajor, &vminor, &vrevision);
|
||||||
|
+ sscanf (version, "Fedora %d.%d.%d", &vmajor, &vminor, &vrevision);
|
||||||
|
set_internalvar_integer (major_version_var, vmajor);
|
||||||
|
set_internalvar_integer (minor_version_var, vminor + (vrevision > 0));
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,207 +0,0 @@
|
||||||
2005-06-09 Jeff Johnston <jjohnstn@redhat.com>
|
|
||||||
|
|
||||||
* gdb.base/gdbinit.exp: New testcase.
|
|
||||||
* gdb.base/gdbinit.sample: Sample .gdbinit for gdbinit.exp.
|
|
||||||
|
|
||||||
2005-06-08 Daniel Jacobowitz <dan@codesourcery.com>
|
|
||||||
Jeff Johnston <jjohnstn@redhat.com>
|
|
||||||
|
|
||||||
* Makefile.in (cli-cmds.o): Update.
|
|
||||||
* configure.in: Add check for getuid.
|
|
||||||
* configure: Regenerated.
|
|
||||||
* config.in: Ditto.
|
|
||||||
* main.c (captured_main): Pass -1 to source_command when loading
|
|
||||||
gdbinit files.
|
|
||||||
* cli/cli-cmds.c: Include "gdb_stat.h" and <fcntl.h>.
|
|
||||||
(source_command): Update documentation. Check permissions if
|
|
||||||
FROM_TTY is -1.
|
|
||||||
|
|
||||||
Index: gdb-6.6/gdb/cli/cli-cmds.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.6.orig/gdb/cli/cli-cmds.c
|
|
||||||
+++ gdb-6.6/gdb/cli/cli-cmds.c
|
|
||||||
@@ -38,6 +38,7 @@
|
|
||||||
#include "objfiles.h"
|
|
||||||
#include "source.h"
|
|
||||||
#include "disasm.h"
|
|
||||||
+#include "gdb_stat.h"
|
|
||||||
|
|
||||||
#include "ui-out.h"
|
|
||||||
|
|
||||||
@@ -461,12 +462,31 @@ source_script (char *file, int from_tty)
|
|
||||||
|
|
||||||
if (fd == -1)
|
|
||||||
{
|
|
||||||
- if (from_tty)
|
|
||||||
+ if (from_tty > 0)
|
|
||||||
perror_with_name (file);
|
|
||||||
else
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
+#ifdef HAVE_GETUID
|
|
||||||
+ if (from_tty == -1)
|
|
||||||
+ {
|
|
||||||
+ struct stat statbuf;
|
|
||||||
+ if (fstat (fd, &statbuf) < 0)
|
|
||||||
+ {
|
|
||||||
+ perror_with_name (file);
|
|
||||||
+ close (fd);
|
|
||||||
+ return;
|
|
||||||
+ }
|
|
||||||
+ if (statbuf.st_uid != getuid () || (statbuf.st_mode & S_IWOTH))
|
|
||||||
+ {
|
|
||||||
+ warning (_("not using untrusted file \"%s\""), file);
|
|
||||||
+ close (fd);
|
|
||||||
+ return;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
stream = fdopen (fd, FOPEN_RT);
|
|
||||||
script_from_file (stream, file);
|
|
||||||
|
|
||||||
Index: gdb-6.6/gdb/testsuite/gdb.base/gdbinit.exp
|
|
||||||
===================================================================
|
|
||||||
--- /dev/null
|
|
||||||
+++ gdb-6.6/gdb/testsuite/gdb.base/gdbinit.exp
|
|
||||||
@@ -0,0 +1,98 @@
|
|
||||||
+# Copyright 2005
|
|
||||||
+# Free Software Foundation, Inc.
|
|
||||||
+
|
|
||||||
+# This program is free software; you can redistribute it and/or modify
|
|
||||||
+# it under the terms of the GNU General Public License as published by
|
|
||||||
+# the Free Software Foundation; either version 2 of the License, or
|
|
||||||
+# (at your option) any later version.
|
|
||||||
+#
|
|
||||||
+# This program is distributed in the hope that it will be useful,
|
|
||||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
+# GNU General Public License for more details.
|
|
||||||
+#
|
|
||||||
+# You should have received a copy of the GNU General Public License
|
|
||||||
+# along with this program; if not, write to the Free Software
|
|
||||||
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
+
|
|
||||||
+# Please email any bugs, comments, and/or additions to this file to:
|
|
||||||
+# bug-gdb@prep.ai.mit.edu
|
|
||||||
+
|
|
||||||
+# This file was written by Jeff Johnston <jjohnstn@redhat.com>.
|
|
||||||
+
|
|
||||||
+if $tracelevel then {
|
|
||||||
+ strace $tracelevel
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+set prms_id 0
|
|
||||||
+set bug_id 0
|
|
||||||
+
|
|
||||||
+# are we on a target board
|
|
||||||
+if [is_remote target] {
|
|
||||||
+ return
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+global verbose
|
|
||||||
+global GDB
|
|
||||||
+global GDBFLAGS
|
|
||||||
+global gdb_prompt
|
|
||||||
+global timeout
|
|
||||||
+global gdb_spawn_id;
|
|
||||||
+
|
|
||||||
+gdb_stop_suppressing_tests;
|
|
||||||
+
|
|
||||||
+verbose "Spawning $GDB -nw"
|
|
||||||
+
|
|
||||||
+if [info exists gdb_spawn_id] {
|
|
||||||
+ return 0;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+if ![is_remote host] {
|
|
||||||
+ if { [which $GDB] == 0 } then {
|
|
||||||
+ perror "$GDB does not exist."
|
|
||||||
+ exit 1
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+set env(HOME) [pwd]
|
|
||||||
+remote_exec build "rm .gdbinit"
|
|
||||||
+remote_exec build "cp ${srcdir}/${subdir}/gdbinit.sample .gdbinit"
|
|
||||||
+remote_exec build "chmod 646 .gdbinit"
|
|
||||||
+
|
|
||||||
+set res [remote_spawn host "$GDB -nw [host_info gdb_opts]"];
|
|
||||||
+if { $res < 0 || $res == "" } {
|
|
||||||
+ perror "Spawning $GDB failed."
|
|
||||||
+ return 1;
|
|
||||||
+}
|
|
||||||
+gdb_expect 360 {
|
|
||||||
+ -re "warning: not using untrusted file.*\.gdbinit.*\[\r\n\]$gdb_prompt $" {
|
|
||||||
+ pass "untrusted .gdbinit caught."
|
|
||||||
+ }
|
|
||||||
+ -re "$gdb_prompt $" {
|
|
||||||
+ fail "untrusted .gdbinit caught."
|
|
||||||
+ }
|
|
||||||
+ timeout {
|
|
||||||
+ fail "(timeout) untrusted .gdbinit caught."
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+remote_exec build "chmod 644 .gdbinit"
|
|
||||||
+set res [remote_spawn host "$GDB -nw [host_info gdb_opts]"];
|
|
||||||
+if { $res < 0 || $res == "" } {
|
|
||||||
+ perror "Spawning $GDB failed."
|
|
||||||
+ return 1;
|
|
||||||
+}
|
|
||||||
+gdb_expect 360 {
|
|
||||||
+ -re "warning: not using untrusted file.*\.gdbinit.*\[\r\n\]$gdb_prompt $" {
|
|
||||||
+ fail "trusted .gdbinit allowed."
|
|
||||||
+ }
|
|
||||||
+ -re "in gdbinit.*$gdb_prompt $" {
|
|
||||||
+ pass "trusted .gdbinit allowed."
|
|
||||||
+ }
|
|
||||||
+ timeout {
|
|
||||||
+ fail "(timeout) trusted .gdbinit allowed."
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+remote_exec build "rm .gdbinit"
|
|
||||||
Index: gdb-6.6/gdb/testsuite/gdb.base/gdbinit.sample
|
|
||||||
===================================================================
|
|
||||||
--- /dev/null
|
|
||||||
+++ gdb-6.6/gdb/testsuite/gdb.base/gdbinit.sample
|
|
||||||
@@ -0,0 +1 @@
|
|
||||||
+echo "\nin gdbinit"
|
|
||||||
Index: gdb-6.6/gdb/main.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.6.orig/gdb/main.c
|
|
||||||
+++ gdb-6.6/gdb/main.c
|
|
||||||
@@ -644,7 +644,7 @@ extern int gdbtk_test (char *);
|
|
||||||
|
|
||||||
if (!inhibit_gdbinit)
|
|
||||||
{
|
|
||||||
- catch_command_errors (source_script, homeinit, 0, RETURN_MASK_ALL);
|
|
||||||
+ catch_command_errors (source_script, homeinit, -1, RETURN_MASK_ALL);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Do stats; no need to do them elsewhere since we'll only
|
|
||||||
@@ -722,7 +722,7 @@ extern int gdbtk_test (char *);
|
|
||||||
|| memcmp ((char *) &homebuf, (char *) &cwdbuf, sizeof (struct stat)))
|
|
||||||
if (!inhibit_gdbinit)
|
|
||||||
{
|
|
||||||
- catch_command_errors (source_script, gdbinit, 0, RETURN_MASK_ALL);
|
|
||||||
+ catch_command_errors (source_script, gdbinit, -1, RETURN_MASK_ALL);
|
|
||||||
}
|
|
||||||
|
|
||||||
for (i = 0; i < ncmd; i++)
|
|
||||||
Index: gdb-6.6/gdb/Makefile.in
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.6.orig/gdb/Makefile.in
|
|
||||||
+++ gdb-6.6/gdb/Makefile.in
|
|
||||||
@@ -2927,7 +2927,7 @@ cli-cmds.o: $(srcdir)/cli/cli-cmds.c $(d
|
|
||||||
$(expression_h) $(frame_h) $(value_h) $(language_h) $(filenames_h) \
|
|
||||||
$(objfiles_h) $(source_h) $(disasm_h) $(ui_out_h) $(top_h) \
|
|
||||||
$(cli_decode_h) $(cli_script_h) $(cli_setshow_h) $(cli_cmds_h) \
|
|
||||||
- $(tui_h)
|
|
||||||
+ $(tui_h) $(gdb_stat_h)
|
|
||||||
$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-cmds.c
|
|
||||||
cli-decode.o: $(srcdir)/cli/cli-decode.c $(defs_h) $(symtab_h) \
|
|
||||||
$(gdb_regex_h) $(gdb_string_h) $(completer_h) $(ui_out_h) \
|
|
|
@ -1,96 +0,0 @@
|
||||||
2005-04-02 Andrew Cagney <cagney@gnu.org>
|
|
||||||
|
|
||||||
* symfile.c (separate_debug_file_exists): When the CRCs mismatch
|
|
||||||
print a warning.
|
|
||||||
(find_separate_debug_file): Pass in the objfile's name.
|
|
||||||
|
|
||||||
Index: gdb-6.8/gdb/symfile.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.8.orig/gdb/symfile.c 2008-01-29 23:47:20.000000000 +0100
|
|
||||||
+++ gdb-6.8/gdb/symfile.c 2008-07-14 10:26:30.000000000 +0200
|
|
||||||
@@ -1348,7 +1348,8 @@ get_debug_link_info (struct objfile *obj
|
|
||||||
}
|
|
||||||
|
|
||||||
static int
|
|
||||||
-separate_debug_file_exists (const char *name, unsigned long crc)
|
|
||||||
+separate_debug_file_exists (const char *name, unsigned long crc,
|
|
||||||
+ const char *parent_name)
|
|
||||||
{
|
|
||||||
unsigned long file_crc = 0;
|
|
||||||
int fd;
|
|
||||||
@@ -1357,6 +1358,12 @@ separate_debug_file_exists (const char *
|
|
||||||
|
|
||||||
fd = open (name, O_RDONLY | O_BINARY);
|
|
||||||
if (fd < 0)
|
|
||||||
+ /* Fail silently, this preserves existing behavior. The
|
|
||||||
+ assumption here is that the file wasn't found because there's
|
|
||||||
+ no file to find (we shouldn't be printing warnings about
|
|
||||||
+ missing debug info files when the user hasn't installed them).
|
|
||||||
+ The alternative is to complain here - that better belongs in a
|
|
||||||
+ warning. */
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
while ((count = read (fd, buffer, sizeof (buffer))) > 0)
|
|
||||||
@@ -1364,7 +1371,16 @@ separate_debug_file_exists (const char *
|
|
||||||
|
|
||||||
close (fd);
|
|
||||||
|
|
||||||
- return crc == file_crc;
|
|
||||||
+ if (crc != file_crc)
|
|
||||||
+ {
|
|
||||||
+ warning (_("the debug information found in \"%s\""
|
|
||||||
+ " does not match \"%s\" (CRC mismatch).\n"),
|
|
||||||
+ name, parent_name);
|
|
||||||
+ return 0;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ /* No worries! */
|
|
||||||
+ return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
char *debug_file_directory = NULL;
|
|
||||||
@@ -1416,6 +1432,8 @@ find_separate_debug_file (struct objfile
|
|
||||||
basename = get_debug_link_info (objfile, &crc32);
|
|
||||||
|
|
||||||
if (basename == NULL)
|
|
||||||
+ /* There's no separate debug info, hence there's no way we could
|
|
||||||
+ load it => no warning. */
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
dir = xstrdup (objfile->name);
|
|
||||||
@@ -1443,7 +1461,7 @@ find_separate_debug_file (struct objfile
|
|
||||||
strcpy (debugfile, dir);
|
|
||||||
strcat (debugfile, basename);
|
|
||||||
|
|
||||||
- if (separate_debug_file_exists (debugfile, crc32))
|
|
||||||
+ if (separate_debug_file_exists (debugfile, crc32, objfile->name))
|
|
||||||
{
|
|
||||||
xfree (basename);
|
|
||||||
xfree (dir);
|
|
||||||
@@ -1456,7 +1474,7 @@ find_separate_debug_file (struct objfile
|
|
||||||
strcat (debugfile, "/");
|
|
||||||
strcat (debugfile, basename);
|
|
||||||
|
|
||||||
- if (separate_debug_file_exists (debugfile, crc32))
|
|
||||||
+ if (separate_debug_file_exists (debugfile, crc32, objfile->name))
|
|
||||||
{
|
|
||||||
xfree (basename);
|
|
||||||
xfree (dir);
|
|
||||||
@@ -1469,7 +1487,7 @@ find_separate_debug_file (struct objfile
|
|
||||||
strcat (debugfile, dir);
|
|
||||||
strcat (debugfile, basename);
|
|
||||||
|
|
||||||
- if (separate_debug_file_exists (debugfile, crc32))
|
|
||||||
+ if (separate_debug_file_exists (debugfile, crc32, objfile->name))
|
|
||||||
{
|
|
||||||
xfree (basename);
|
|
||||||
xfree (dir);
|
|
||||||
@@ -1488,7 +1506,7 @@ find_separate_debug_file (struct objfile
|
|
||||||
strcat (debugfile, "/");
|
|
||||||
strcat (debugfile, basename);
|
|
||||||
|
|
||||||
- if (separate_debug_file_exists (debugfile, crc32))
|
|
||||||
+ if (separate_debug_file_exists (debugfile, crc32, objfile->name))
|
|
||||||
{
|
|
||||||
xfree (canon_name);
|
|
||||||
xfree (basename);
|
|
|
@ -1,52 +0,0 @@
|
||||||
2004-06-21 Andrew Cagney <cagney@gnu.org>
|
|
||||||
|
|
||||||
* i386-tdep.c (i386_gdbarch_init): Move the the dwarf2-frame
|
|
||||||
sniffer registration to after the signal trampoline frame sniffer.
|
|
||||||
* amd64-tdep.c (amd64_init_abi): Include "dwarf2-frame.h".
|
|
||||||
Register the dwarf2-frame sniffer, but after the signal trampoline
|
|
||||||
sniffer.
|
|
||||||
|
|
||||||
Index: gdb-6.8/gdb/amd64-tdep.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.8.orig/gdb/amd64-tdep.c 2008-03-04 20:49:39.000000000 +0100
|
|
||||||
+++ gdb-6.8/gdb/amd64-tdep.c 2008-07-14 10:24:54.000000000 +0200
|
|
||||||
@@ -34,7 +34,7 @@
|
|
||||||
#include "regcache.h"
|
|
||||||
#include "regset.h"
|
|
||||||
#include "symfile.h"
|
|
||||||
-
|
|
||||||
+#include "dwarf2-frame.h"
|
|
||||||
#include "gdb_assert.h"
|
|
||||||
|
|
||||||
#include "amd64-tdep.h"
|
|
||||||
@@ -1167,6 +1167,8 @@ amd64_init_abi (struct gdbarch_info info
|
|
||||||
set_gdbarch_unwind_dummy_id (gdbarch, amd64_unwind_dummy_id);
|
|
||||||
|
|
||||||
frame_unwind_append_sniffer (gdbarch, amd64_sigtramp_frame_sniffer);
|
|
||||||
+ /* Hook in the DWARF CFI frame unwinder after sigtramp. */
|
|
||||||
+ frame_unwind_append_sniffer (gdbarch, dwarf2_frame_sniffer);
|
|
||||||
frame_unwind_append_sniffer (gdbarch, amd64_frame_sniffer);
|
|
||||||
frame_base_set_default (gdbarch, &amd64_frame_base);
|
|
||||||
|
|
||||||
Index: gdb-6.8/gdb/i386-tdep.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.8.orig/gdb/i386-tdep.c 2008-03-04 20:49:39.000000000 +0100
|
|
||||||
+++ gdb-6.8/gdb/i386-tdep.c 2008-07-14 10:24:54.000000000 +0200
|
|
||||||
@@ -2480,15 +2480,14 @@ i386_gdbarch_init (struct gdbarch_info i
|
|
||||||
/* Helper for function argument information. */
|
|
||||||
set_gdbarch_fetch_pointer_argument (gdbarch, i386_fetch_pointer_argument);
|
|
||||||
|
|
||||||
- /* Hook in the DWARF CFI frame unwinder. */
|
|
||||||
- frame_unwind_append_sniffer (gdbarch, dwarf2_frame_sniffer);
|
|
||||||
-
|
|
||||||
frame_base_set_default (gdbarch, &i386_frame_base);
|
|
||||||
|
|
||||||
/* Hook in ABI-specific overrides, if they have been registered. */
|
|
||||||
gdbarch_init_osabi (info, gdbarch);
|
|
||||||
|
|
||||||
frame_unwind_append_sniffer (gdbarch, i386_sigtramp_frame_sniffer);
|
|
||||||
+ /* Hook in the DWARF CFI frame unwinder after sigtramp. */
|
|
||||||
+ frame_unwind_append_sniffer (gdbarch, dwarf2_frame_sniffer);
|
|
||||||
frame_unwind_append_sniffer (gdbarch, i386_frame_sniffer);
|
|
||||||
|
|
||||||
/* If we have a register mapping, enable the generic core file
|
|
|
@ -1,178 +0,0 @@
|
||||||
2005-02-11 Jeff Johnston <jjohnstn@redhat.com>
|
|
||||||
|
|
||||||
* testsuite/gdb.threads/step-thread-exit.c: New testcase.
|
|
||||||
* testsuite/gdb.threads/step-thread-exit.exp: Ditto.
|
|
||||||
|
|
||||||
Index: gdb-6.5/gdb/testsuite/gdb.threads/step-thread-exit.c
|
|
||||||
===================================================================
|
|
||||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
|
||||||
+++ gdb-6.5/gdb/testsuite/gdb.threads/step-thread-exit.c 2006-07-12 03:18:47.000000000 -0300
|
|
||||||
@@ -0,0 +1,50 @@
|
|
||||||
+/* This testcase is part of GDB, the GNU debugger.
|
|
||||||
+
|
|
||||||
+ Copyright 2005 Free Software Foundation, Inc.
|
|
||||||
+
|
|
||||||
+ This program is free software; you can redistribute it and/or modify
|
|
||||||
+ it under the terms of the GNU General Public License as published by
|
|
||||||
+ the Free Software Foundation; either version 2 of the License, or
|
|
||||||
+ (at your option) any later version.
|
|
||||||
+
|
|
||||||
+ This program is distributed in the hope that it will be useful,
|
|
||||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
+ GNU General Public License for more details.
|
|
||||||
+
|
|
||||||
+ You should have received a copy of the GNU General Public License
|
|
||||||
+ along with this program; if not, write to the Free Software
|
|
||||||
+ Foundation, Inc., 59 Temple Place - Suite 330,
|
|
||||||
+ Boston, MA 02111-1307, USA. */
|
|
||||||
+
|
|
||||||
+#include <pthread.h>
|
|
||||||
+#include <stdio.h>
|
|
||||||
+#include <stdlib.h>
|
|
||||||
+#include <unistd.h>
|
|
||||||
+
|
|
||||||
+void *thread_function (void *ptr)
|
|
||||||
+{
|
|
||||||
+ int *x = (int *)ptr;
|
|
||||||
+ printf("In thread_function, *x is %d\n", *x);
|
|
||||||
+} /* thread_function_end */
|
|
||||||
+
|
|
||||||
+volatile int repeat = 0;
|
|
||||||
+
|
|
||||||
+main()
|
|
||||||
+{
|
|
||||||
+ int ret;
|
|
||||||
+ pthread_t th;
|
|
||||||
+ int i = 3;
|
|
||||||
+
|
|
||||||
+ ret = pthread_create (&th, NULL, thread_function, &i);
|
|
||||||
+ do
|
|
||||||
+ {
|
|
||||||
+ repeat = 0;
|
|
||||||
+ sleep (3); /* sleep */
|
|
||||||
+ }
|
|
||||||
+ while (repeat);
|
|
||||||
+ pthread_join (th, NULL);
|
|
||||||
+ return 0;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+
|
|
||||||
Index: gdb-6.5/gdb/testsuite/gdb.threads/step-thread-exit.exp
|
|
||||||
===================================================================
|
|
||||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
|
||||||
+++ gdb-6.5/gdb/testsuite/gdb.threads/step-thread-exit.exp 2006-07-12 03:22:30.000000000 -0300
|
|
||||||
@@ -0,0 +1,113 @@
|
|
||||||
+# This testcase is part of GDB, the GNU debugger.
|
|
||||||
+
|
|
||||||
+# Copyright 2005 Free Software Foundation, Inc.
|
|
||||||
+
|
|
||||||
+# This program is free software; you can redistribute it and/or modify
|
|
||||||
+# it under the terms of the GNU General Public License as published by
|
|
||||||
+# the Free Software Foundation; either version 2 of the License, or
|
|
||||||
+# (at your option) any later version.
|
|
||||||
+#
|
|
||||||
+# This program is distributed in the hope that it will be useful,
|
|
||||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
+# GNU General Public License for more details.
|
|
||||||
+#
|
|
||||||
+# You should have received a copy of the GNU General Public License
|
|
||||||
+# along with this program; if not, write to the Free Software
|
|
||||||
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
+
|
|
||||||
+# Check that GDB can step over a thread exit.
|
|
||||||
+
|
|
||||||
+if $tracelevel {
|
|
||||||
+ strace $tracelevel
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+set prms_id 0
|
|
||||||
+set bug_id 0
|
|
||||||
+
|
|
||||||
+set testfile "step-thread-exit"
|
|
||||||
+set srcfile ${testfile}.c
|
|
||||||
+set binfile ${objdir}/${subdir}/${testfile}
|
|
||||||
+if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "incdir=${objdir}"]] != "" } {
|
|
||||||
+ return -1
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+gdb_exit
|
|
||||||
+gdb_start
|
|
||||||
+gdb_reinitialize_dir $srcdir/$subdir
|
|
||||||
+gdb_load ${binfile}
|
|
||||||
+
|
|
||||||
+# Reset the debug file directory so we can't debug within the C library
|
|
||||||
+gdb_test "set debug-file-directory ." "" ""
|
|
||||||
+
|
|
||||||
+#
|
|
||||||
+# Run to `main' where we begin our tests.
|
|
||||||
+#
|
|
||||||
+
|
|
||||||
+if ![runto_main] then {
|
|
||||||
+ gdb_suppress_tests
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+set sleep_line [expr [gdb_get_line_number "sleep"]]
|
|
||||||
+set end_line [expr [gdb_get_line_number "thread_function_end"]]
|
|
||||||
+
|
|
||||||
+gdb_breakpoint "$end_line"
|
|
||||||
+gdb_test "continue" "Break.*thread_function.*" "continue to thread_function 1"
|
|
||||||
+
|
|
||||||
+# Keep nexting until we cause the thread to exit. We expect the main
|
|
||||||
+# thread to be stopped and a message printed to tell us we have stepped
|
|
||||||
+# over the thread exit.
|
|
||||||
+set test "step over thread exit 1"
|
|
||||||
+gdb_test_multiple "next" "$test" {
|
|
||||||
+ -re "\}.*$gdb_prompt $" {
|
|
||||||
+ send_gdb "next\n"
|
|
||||||
+ exp_continue
|
|
||||||
+ }
|
|
||||||
+ -re "Stepped over thread exit.*Program received signal SIGSTOP.*$gdb_prompt $" {
|
|
||||||
+ pass "$test"
|
|
||||||
+ }
|
|
||||||
+ -re "start_thread.*$gdb_prompt $" {
|
|
||||||
+ send_gdb "next\n"
|
|
||||||
+ exp_continue
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+gdb_test "bt" ".*sleep.*main.*$sleep_line.*" "backtrace after step 1"
|
|
||||||
+
|
|
||||||
+runto_main
|
|
||||||
+gdb_breakpoint "$sleep_line"
|
|
||||||
+gdb_breakpoint "$end_line"
|
|
||||||
+set test "continue to thread_function 2"
|
|
||||||
+gdb_test_multiple "continue" "$test" {
|
|
||||||
+ -re "Break.*thread_function.*$gdb_prompt $" {
|
|
||||||
+ pass $test
|
|
||||||
+ }
|
|
||||||
+ -re "Break.*$sleep_line.*$gdb_prompt $" {
|
|
||||||
+ gdb_test "set repeat=1" "" ""
|
|
||||||
+ send_gdb "continue\n"
|
|
||||||
+ exp_continue
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+# Keep nexting until we cause the thread to exit. In this case, we
|
|
||||||
+# expect the breakpoint in the main thread to have already triggered
|
|
||||||
+# and so we should stop there with a message that we stepped over
|
|
||||||
+# the thread exit.
|
|
||||||
+set test "step over thread exit 2"
|
|
||||||
+gdb_test_multiple "next" "$test" {
|
|
||||||
+ -re "\}.*$gdb_prompt $" {
|
|
||||||
+ send_gdb "next\n"
|
|
||||||
+ exp_continue
|
|
||||||
+ }
|
|
||||||
+ -re "Stepped over thread exit.*Break.*$sleep_line.*$gdb_prompt $" {
|
|
||||||
+ pass "$test (breakpoint hit)"
|
|
||||||
+ }
|
|
||||||
+ -re "Stepped over thread exit.*$gdb_prompt $" {
|
|
||||||
+ pass "$test (breakpoint not hit)"
|
|
||||||
+ }
|
|
||||||
+ -re "start_thread.*$gdb_prompt $" {
|
|
||||||
+ send_gdb "next\n"
|
|
||||||
+ exp_continue
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+
|
|
|
@ -1,28 +0,0 @@
|
||||||
2005-02-14 Jeff Johnston <jjohnstn@redhat.com>
|
|
||||||
|
|
||||||
* top.c (gdb_readline_wrapper): Ensure terminal is gdb's before calling
|
|
||||||
readline.
|
|
||||||
|
|
||||||
2007-10-14 Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
||||||
|
|
||||||
Port to GDB-6.7.
|
|
||||||
|
|
||||||
Index: gdb-6.7/gdb/top.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.7.orig/gdb/top.c 2007-09-02 23:13:56.000000000 +0200
|
|
||||||
+++ gdb-6.7/gdb/top.c 2007-10-14 23:38:27.000000000 +0200
|
|
||||||
@@ -795,6 +795,14 @@ gdb_readline_wrapper (char *prompt)
|
|
||||||
|
|
||||||
back_to = make_cleanup (gdb_readline_wrapper_cleanup, cleanup);
|
|
||||||
|
|
||||||
+ /* Before calling readline, ensure we have the terminal. If we don't
|
|
||||||
+ have the terminal and call readline, we risk the possibility of
|
|
||||||
+ gdb being thrown into the background. This problem occurs when
|
|
||||||
+ we attach to a background process on the same terminal the background
|
|
||||||
+ process was started from and then perform some action which requires
|
|
||||||
+ a page break prompt. */
|
|
||||||
+ terminal_ours ();
|
|
||||||
+
|
|
||||||
/* Display our prompt and prevent double prompt display. */
|
|
||||||
display_gdb_prompt (prompt);
|
|
||||||
rl_already_prompted = 1;
|
|
|
@ -1,32 +1,15 @@
|
||||||
Index: gdb/testsuite/ChangeLog
|
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||||
2005-01-21 Jeff Johnston <jjohnstn@redhat.com>
|
From: Fedora GDB patches <invalid@email.com>
|
||||||
|
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||||
|
Subject: gdb-6.3-test-dtorfix-20050121.patch
|
||||||
|
|
||||||
* gdb.cp/constructortest.exp: New test.
|
;; Test support of multiple destructors just like multiple constructors
|
||||||
* gdb.cp/constructortest.cc: Ditto.
|
;;=fedoratest
|
||||||
* gdb.cp/templates.exp: Change break of dtor to be fully quoted.
|
|
||||||
|
|
||||||
2007-09-22 Jan Kratochvil <jan.kratochvil@redhat.com>
|
diff --git a/gdb/testsuite/gdb.cp/constructortest.cc b/gdb/testsuite/gdb.cp/constructortest.cc
|
||||||
|
new file mode 100644
|
||||||
* gdb.cp/constructortest.exp, gdb.cp/constructortest.cc: Test also the
|
--- /dev/null
|
||||||
`$delete' destructor variant.
|
+++ b/gdb/testsuite/gdb.cp/constructortest.cc
|
||||||
|
|
||||||
2007-09-25 Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
||||||
|
|
||||||
* gdb.cp/constructortest.exp: Delete the FIXME workaround of restarting
|
|
||||||
the whole GDB.
|
|
||||||
|
|
||||||
2007-10-05 Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
||||||
|
|
||||||
* gdb.cp/constructortest.exp: Test BREAKPOINT_RE_SET for multiple PCs
|
|
||||||
by PIE.
|
|
||||||
* gdb.cp/constructortest.exp: Handle the change of settings breakpoints
|
|
||||||
always at all the ctor/dtor variants.
|
|
||||||
|
|
||||||
[ Removed the `gdb.cp/templates.exp' patch. ]
|
|
||||||
[ Updated the patch for "(X location") of GDB-6.8+. ]
|
|
||||||
|
|
||||||
--- gdb-6.3/gdb/testsuite/gdb.cp/constructortest.cc.fix Fri Jan 21 17:06:56 2005
|
|
||||||
+++ gdb-6.3/gdb/testsuite/gdb.cp/constructortest.cc Fri Jan 21 17:05:18 2005
|
|
||||||
@@ -0,0 +1,99 @@
|
@@ -0,0 +1,99 @@
|
||||||
+/* This testcase is part of GDB, the GNU debugger.
|
+/* This testcase is part of GDB, the GNU debugger.
|
||||||
+
|
+
|
||||||
|
@ -127,9 +110,11 @@ Index: gdb/testsuite/ChangeLog
|
||||||
+{
|
+{
|
||||||
+ y = 2; /* First line D */
|
+ y = 2; /* First line D */
|
||||||
+}
|
+}
|
||||||
--- gdb-6.3/gdb/testsuite/gdb.cp/constructortest.exp.fix Fri Jan 21 17:07:02 2005
|
diff --git a/gdb/testsuite/gdb.cp/constructortest.exp b/gdb/testsuite/gdb.cp/constructortest.exp
|
||||||
+++ gdb-6.3/gdb/testsuite/gdb.cp/constructortest.exp Fri Jan 21 17:05:29 2005
|
new file mode 100644
|
||||||
@@ -0,0 +1,131 @@
|
--- /dev/null
|
||||||
|
+++ b/gdb/testsuite/gdb.cp/constructortest.exp
|
||||||
|
@@ -0,0 +1,130 @@
|
||||||
+# This testcase is part of GDB, the GNU debugger.
|
+# This testcase is part of GDB, the GNU debugger.
|
||||||
+
|
+
|
||||||
+# Copyright 2005, 2007 Free Software Foundation, Inc.
|
+# Copyright 2005, 2007 Free Software Foundation, Inc.
|
||||||
|
@ -150,16 +135,9 @@ Index: gdb/testsuite/ChangeLog
|
||||||
+
|
+
|
||||||
+# Check that GDB can break at multiple forms of constructors.
|
+# Check that GDB can break at multiple forms of constructors.
|
||||||
+
|
+
|
||||||
+if $tracelevel {
|
|
||||||
+ strace $tracelevel
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+set prms_id 0
|
|
||||||
+set bug_id 0
|
|
||||||
+
|
|
||||||
+set testfile "constructortest"
|
+set testfile "constructortest"
|
||||||
+set srcfile ${testfile}.cc
|
+set srcfile ${testfile}.cc
|
||||||
+set binfile ${objdir}/${subdir}/${testfile}
|
+set binfile [standard_output_file ${testfile}]
|
||||||
+# PIE is required for testing proper BREAKPOINT_RE_SET of the multiple-PC
|
+# PIE is required for testing proper BREAKPOINT_RE_SET of the multiple-PC
|
||||||
+# breakpoints.
|
+# breakpoints.
|
||||||
+if {[gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug c++ "additional_flags=-fpie -pie"}] != "" } {
|
+if {[gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug c++ "additional_flags=-fpie -pie"}] != "" } {
|
||||||
|
@ -179,8 +157,9 @@ Index: gdb/testsuite/ChangeLog
|
||||||
+ gdb_suppress_tests
|
+ gdb_suppress_tests
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
+# Break on the various forms of the A::A constructor
|
+# Break on the various forms of the A::A constructor.
|
||||||
+gdb_test "break A\:\:A" "Breakpoint 2 at .* \\(2 locations\\)" "breaking on A::A"
|
+# " (2 locations)" is displayed depending on G++ version.
|
||||||
|
+gdb_test "break A\:\:A" "Breakpoint 2 at .*" "breaking on A::A"
|
||||||
+
|
+
|
||||||
+# Verify that we break for the A constructor two times
|
+# Verify that we break for the A constructor two times
|
||||||
+# Once for new A and once for new B
|
+# Once for new A and once for new B
|
||||||
|
@ -206,7 +185,8 @@ Index: gdb/testsuite/ChangeLog
|
||||||
+gdb_test "break 'A::A()'" "" "break in constructor A 2"
|
+gdb_test "break 'A::A()'" "" "break in constructor A 2"
|
||||||
+gdb_continue_to_breakpoint "First line A"
|
+gdb_continue_to_breakpoint "First line A"
|
||||||
+set second_line [gdb_get_line_number "Second line A"]
|
+set second_line [gdb_get_line_number "Second line A"]
|
||||||
+gdb_test "break $second_line" "Breakpoint .*, line $second_line. \\(2 locations\\)" "break by line in constructor"
|
+# " (2 locations)" is displayed depending on G++ version.
|
||||||
|
+gdb_test "break $second_line" "Breakpoint .*, line $second_line\\..*" "break by line in constructor"
|
||||||
+gdb_continue_to_breakpoint "Second line A"
|
+gdb_continue_to_breakpoint "Second line A"
|
||||||
+gdb_test "bt" "#0.*A.*#1.*main.*" "Verify in in-charge A::A second line"
|
+gdb_test "bt" "#0.*A.*#1.*main.*" "Verify in in-charge A::A second line"
|
||||||
+gdb_continue_to_breakpoint "Second line A"
|
+gdb_continue_to_breakpoint "Second line A"
|
||||||
|
@ -217,7 +197,8 @@ Index: gdb/testsuite/ChangeLog
|
||||||
+gdb_test "break 'A::~A()'" "" "break in constructor ~A 2"
|
+gdb_test "break 'A::~A()'" "" "break in constructor ~A 2"
|
||||||
+gdb_continue_to_breakpoint "First line ~A"
|
+gdb_continue_to_breakpoint "First line ~A"
|
||||||
+set second_line_dtor [gdb_get_line_number "Second line ~A"]
|
+set second_line_dtor [gdb_get_line_number "Second line ~A"]
|
||||||
+gdb_test "break $second_line_dtor" "Breakpoint .*, line $second_line_dtor. \\(2 locations\\)" "break by line in destructor"
|
+# " (2 locations)" is displayed depending on G++ version.
|
||||||
|
+gdb_test "break $second_line_dtor" "Breakpoint .*, line $second_line_dtor\\..*" "break by line in destructor"
|
||||||
+gdb_continue_to_breakpoint "Second line ~A"
|
+gdb_continue_to_breakpoint "Second line ~A"
|
||||||
+gdb_test "bt" "#0.*A.*#1.*main.*" "Verify in in-charge A::~A second line"
|
+gdb_test "bt" "#0.*A.*#1.*main.*" "Verify in in-charge A::~A second line"
|
||||||
+# FIXME: Analyse this case better.
|
+# FIXME: Analyse this case better.
|
||||||
|
@ -232,8 +213,11 @@ Index: gdb/testsuite/ChangeLog
|
||||||
+gdb_load ${binfile}
|
+gdb_load ${binfile}
|
||||||
+runto_main
|
+runto_main
|
||||||
+
|
+
|
||||||
|
+set first_line_dtor [gdb_get_line_number "First line ~C"]
|
||||||
|
+set define_line_dtor [gdb_get_line_number "Destructor C"]
|
||||||
+# Break on the various forms of the C::~C destructor
|
+# Break on the various forms of the C::~C destructor
|
||||||
+gdb_test "break C\:\:~C" "Breakpoint .* \\(3 locations\\)" "breaking on C::~C"
|
+# " ([23] locations)" is displayed depending on G++ version.
|
||||||
|
+gdb_test "break C\:\:~C" "Breakpoint .*: C::~C\\. \\(2 locations\\)" "breaking on C::~C"
|
||||||
+gdb_continue_to_breakpoint "First line ~C"
|
+gdb_continue_to_breakpoint "First line ~C"
|
||||||
+
|
+
|
||||||
+# Verify that we can break by line number in a destructor and find
|
+# Verify that we can break by line number in a destructor and find
|
||||||
|
@ -242,8 +226,8 @@ Index: gdb/testsuite/ChangeLog
|
||||||
+gdb_load ${binfile}
|
+gdb_load ${binfile}
|
||||||
+delete_breakpoints
|
+delete_breakpoints
|
||||||
+
|
+
|
||||||
+set first_line_dtor [gdb_get_line_number "First line ~C"]
|
+# " (3 locations)" is displayed depending on G++ version.
|
||||||
+gdb_test "break $first_line_dtor" "Breakpoint .*, line $first_line_dtor. \\(3 locations\\)" "break by line in destructor"
|
+gdb_test "break $first_line_dtor" "Breakpoint .*, line $first_line_dtor\\..*" "break by line in destructor"
|
||||||
+
|
+
|
||||||
+# Run to `main' where we begin our tests.
|
+# Run to `main' where we begin our tests.
|
||||||
+# Set the breakpoints first to test PIE multiple-PC BREAKPOINT_RE_SET.
|
+# Set the breakpoints first to test PIE multiple-PC BREAKPOINT_RE_SET.
|
||||||
|
|
|
@ -1,12 +1,23 @@
|
||||||
|
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||||
|
From: Elena Zannoni <ezannoni@redhat.com>
|
||||||
|
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||||
|
Subject: gdb-6.3-test-movedir-20050125.patch
|
||||||
|
|
||||||
|
;; Fix to support executable moving
|
||||||
|
;;=fedoratest
|
||||||
|
|
||||||
2005-01-25 Elena Zannoni <ezannoni@redhat.com>
|
2005-01-25 Elena Zannoni <ezannoni@redhat.com>
|
||||||
|
|
||||||
* gdb.base/move-dir.exp: New test.
|
* gdb.base/move-dir.exp: New test.
|
||||||
* gdb.base/move-dir.c: Ditto.
|
* gdb.base/move-dir.c: Ditto.
|
||||||
* gdb.base/move-dir.h: Ditto.
|
* gdb.base/move-dir.h: Ditto.
|
||||||
|
|
||||||
--- gdb-6.3/gdb/testsuite/gdb.base/move-dir.c.fix Tue Jan 25 19:13:14 2005
|
diff --git a/gdb/testsuite/gdb.base/move-dir.c b/gdb/testsuite/gdb.base/move-dir.c
|
||||||
+++ gdb-6.3/gdb/testsuite/gdb.base/move-dir.c Tue Jan 25 19:12:40 2005
|
new file mode 100644
|
||||||
@@ -0,0 +1,9 @@
|
--- /dev/null
|
||||||
|
+++ b/gdb/testsuite/gdb.base/move-dir.c
|
||||||
|
@@ -0,0 +1,10 @@
|
||||||
|
+#include <stdio.h>
|
||||||
+#include <stdlib.h>
|
+#include <stdlib.h>
|
||||||
+#include "move-dir.h"
|
+#include "move-dir.h"
|
||||||
+
|
+
|
||||||
|
@ -16,9 +27,11 @@
|
||||||
+ other();
|
+ other();
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
--- gdb-6.3/gdb/testsuite/gdb.base/move-dir.exp.fix Tue Jan 25 19:13:21 2005
|
diff --git a/gdb/testsuite/gdb.base/move-dir.exp b/gdb/testsuite/gdb.base/move-dir.exp
|
||||||
+++ gdb-6.3/gdb/testsuite/gdb.base/move-dir.exp Tue Jan 25 19:12:40 2005
|
new file mode 100644
|
||||||
@@ -0,0 +1,67 @@
|
--- /dev/null
|
||||||
|
+++ b/gdb/testsuite/gdb.base/move-dir.exp
|
||||||
|
@@ -0,0 +1,57 @@
|
||||||
+# Copyright 2005
|
+# Copyright 2005
|
||||||
+# Free Software Foundation, Inc.
|
+# Free Software Foundation, Inc.
|
||||||
+
|
+
|
||||||
|
@ -36,30 +49,20 @@
|
||||||
+# along with this program; if not, write to the Free Software
|
+# along with this program; if not, write to the Free Software
|
||||||
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
+
|
+
|
||||||
+# Please email any bugs, comments, and/or additions to this file to:
|
|
||||||
+# bug-gdb@prep.ai.mit.edu
|
|
||||||
+
|
|
||||||
+if $tracelevel then {
|
|
||||||
+ strace $tracelevel
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+set prms_id 0
|
|
||||||
+set bug_id 0
|
|
||||||
+
|
|
||||||
+set testfile "move-dir"
|
+set testfile "move-dir"
|
||||||
+set srcfile ${testfile}.c
|
+set srcfile ${testfile}.c
|
||||||
+set incfile ${testfile}.h
|
+set incfile ${testfile}.h
|
||||||
+set binfile ${objdir}/${subdir}/${testfile}
|
+set binfile [standard_output_file ${testfile}]
|
||||||
+
|
+
|
||||||
+set testdir "${objdir}/${subdir}/incdir"
|
+set testdir [standard_output_file incdir]
|
||||||
+
|
+
|
||||||
+remote_exec build "mkdir $testdir"
|
+remote_exec build "mkdir $testdir"
|
||||||
+remote_exec build "cp ${srcdir}/${subdir}/${srcfile} ${objdir}/${subdir}"
|
+remote_exec build "cp ${srcdir}/${subdir}/${srcfile} [standard_output_file ${srcfile}]"
|
||||||
+remote_exec build "cp ${srcdir}/${subdir}/${incfile} ${testdir}"
|
+remote_exec build "cp ${srcdir}/${subdir}/${incfile} [standard_output_file ${incfile}]"
|
||||||
+
|
+
|
||||||
+set additional_flags "additional_flags=-I${subdir}/incdir"
|
+set additional_flags "additional_flags=-I${subdir}/incdir"
|
||||||
+
|
+
|
||||||
+if { [gdb_compile "${objdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug $additional_flags]] != "" } {
|
+if { [gdb_compile [standard_output_file ${srcfile}] "${binfile}" executable [list debug $additional_flags]] != "" } {
|
||||||
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
|
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
|
@ -86,8 +89,10 @@
|
||||||
+
|
+
|
||||||
+set timeout $oldtimeout
|
+set timeout $oldtimeout
|
||||||
+return 0
|
+return 0
|
||||||
--- gdb-6.3/gdb/testsuite/gdb.base/move-dir.h.fix Tue Jan 25 19:17:50 2005
|
diff --git a/gdb/testsuite/gdb.base/move-dir.h b/gdb/testsuite/gdb.base/move-dir.h
|
||||||
+++ gdb-6.3/gdb/testsuite/gdb.base/move-dir.h Tue Jan 25 19:19:20 2005
|
new file mode 100644
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/gdb/testsuite/gdb.base/move-dir.h
|
||||||
@@ -0,0 +1,7 @@
|
@@ -0,0 +1,7 @@
|
||||||
+#include <stdlib.h>
|
+#include <stdlib.h>
|
||||||
+
|
+
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,3 +1,11 @@
|
||||||
|
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||||
|
From: Elena Zannoni <ezannoni@redhat.com>
|
||||||
|
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||||
|
Subject: gdb-6.3-test-self-20050110.patch
|
||||||
|
|
||||||
|
;; Get selftest working with sep-debug-info
|
||||||
|
;;=fedoratest
|
||||||
|
|
||||||
2004-02-23 Elena Zannoni <ezannoni@redhat.com>
|
2004-02-23 Elena Zannoni <ezannoni@redhat.com>
|
||||||
|
|
||||||
* gdb.gdb/selftest.exp: Make sure that the debug directory is
|
* gdb.gdb/selftest.exp: Make sure that the debug directory is
|
||||||
|
@ -6,88 +14,29 @@
|
||||||
* gdb.gdb/xfullpath.exp: Ditto.
|
* gdb.gdb/xfullpath.exp: Ditto.
|
||||||
* gdb.gdb/observer.exp: Ditto.
|
* gdb.gdb/observer.exp: Ditto.
|
||||||
|
|
||||||
--- gdb-6.3/gdb/testsuite/gdb.gdb/complaints.exp.fix Mon Jan 10 19:21:20 2005
|
diff --git a/gdb/testsuite/lib/selftest-support.exp b/gdb/testsuite/lib/selftest-support.exp
|
||||||
+++ gdb-6.3/gdb/testsuite/gdb.gdb/complaints.exp Mon Jan 10 19:24:38 2005
|
--- a/gdb/testsuite/lib/selftest-support.exp
|
||||||
@@ -304,13 +304,13 @@ proc find_gdb { arg } {
|
+++ b/gdb/testsuite/lib/selftest-support.exp
|
||||||
set GDB_FULLPATH [find_gdb $GDB]
|
@@ -152,18 +152,18 @@ proc do_self_tests {function body} {
|
||||||
|
|
||||||
# Remove any old copy lying around.
|
|
||||||
-remote_file host delete x$tool
|
|
||||||
+#remote_file host delete x$tool
|
|
||||||
|
|
||||||
gdb_start
|
|
||||||
|
|
||||||
-set file [remote_download host $GDB_FULLPATH x$tool]
|
|
||||||
+#set file [remote_download host $GDB_FULLPATH x$tool]
|
|
||||||
|
|
||||||
-set setup_result [setup_test $file ]
|
|
||||||
+set setup_result [setup_test $GDB_FULLPATH ]
|
|
||||||
if {$setup_result <0} then {
|
|
||||||
return -1
|
|
||||||
}
|
}
|
||||||
@@ -321,4 +321,4 @@ test_short_complaints
|
|
||||||
test_empty_complaints
|
|
||||||
|
|
||||||
gdb_exit;
|
|
||||||
-catch "remote_file host delete $file";
|
|
||||||
+#catch "remote_file host delete $file";
|
|
||||||
--- gdb-6.3/gdb/testsuite/gdb.gdb/observer.exp.fix Mon Jan 10 19:21:27 2005
|
|
||||||
+++ gdb-6.3/gdb/testsuite/gdb.gdb/observer.exp Mon Jan 10 19:24:38 2005
|
|
||||||
@@ -259,13 +259,13 @@ proc find_gdb { arg } {
|
|
||||||
set GDB_FULLPATH [find_gdb $GDB]
|
|
||||||
|
|
||||||
# Remove any old copy lying around.
|
# Remove any old copy lying around.
|
||||||
-remote_file host delete x$tool
|
- remote_file host delete $xgdb
|
||||||
+#remote_file host delete x$tool
|
+ #remote_file host delete $xgdb
|
||||||
|
|
||||||
gdb_start
|
gdb_start
|
||||||
-set file [remote_download host $GDB_FULLPATH x$tool]
|
- set file [remote_download host $GDB_FULLPATH $xgdb]
|
||||||
-set result [test_observer_normal_stop $file];
|
+ #set file [remote_download host $GDB_FULLPATH $xgdb]
|
||||||
+#set file [remote_download host $GDB_FULLPATH x$tool]
|
|
||||||
+set result [test_observer_normal_stop $GDB_FULLPATH];
|
- set result [selftest_setup $file $function]
|
||||||
gdb_exit;
|
+ set result [selftest_setup $GDB_FULLPATH $function]
|
||||||
-catch "remote_file host delete $file";
|
if {$result == 0} then {
|
||||||
+#catch "remote_file host delete $file";
|
set result [uplevel $body]
|
||||||
|
}
|
||||||
if {$result <0} then {
|
|
||||||
warning "Couldn't test self"
|
gdb_exit
|
||||||
--- gdb-6.3/gdb/testsuite/gdb.gdb/selftest.exp.fix Mon Jan 10 19:21:33 2005
|
- catch "remote_file host delete $file"
|
||||||
+++ gdb-6.3/gdb/testsuite/gdb.gdb/selftest.exp Mon Jan 10 19:24:38 2005
|
+ #catch "remote_file host delete $file"
|
||||||
@@ -512,13 +512,13 @@ proc find_gdb { arg } {
|
|
||||||
set GDB_FULLPATH [find_gdb $GDB]
|
|
||||||
|
|
||||||
# Remove any old copy lying around.
|
|
||||||
-remote_file host delete x$tool
|
|
||||||
+#remote_file host delete x$tool
|
|
||||||
|
|
||||||
gdb_start
|
|
||||||
-set file [remote_download host $GDB_FULLPATH x$tool]
|
|
||||||
-set result [test_with_self $file];
|
|
||||||
+#set file [remote_download host $GDB_FULLPATH x$tool]
|
|
||||||
+set result [test_with_self $GDB_FULLPATH];
|
|
||||||
gdb_exit;
|
|
||||||
-catch "remote_file host delete $file";
|
|
||||||
+#catch "remote_file host delete $file";
|
|
||||||
|
|
||||||
if {$result <0} then {
|
|
||||||
warning "Couldn't test self"
|
|
||||||
--- gdb-6.3/gdb/testsuite/gdb.gdb/xfullpath.exp.fix Mon Jan 10 19:21:40 2005
|
|
||||||
+++ gdb-6.3/gdb/testsuite/gdb.gdb/xfullpath.exp Mon Jan 10 19:24:38 2005
|
|
||||||
@@ -181,13 +181,13 @@ proc find_gdb { arg } {
|
|
||||||
set GDB_FULLPATH [find_gdb $GDB]
|
|
||||||
|
|
||||||
# Remove any old copy lying around.
|
|
||||||
-remote_file host delete x$tool
|
|
||||||
+#remote_file host delete x$tool
|
|
||||||
|
|
||||||
gdb_start
|
|
||||||
-set file [remote_download host $GDB_FULLPATH x$tool]
|
|
||||||
-set result [test_with_self $file];
|
|
||||||
+#set file [remote_download host $GDB_FULLPATH x$tool]
|
|
||||||
+set result [test_with_self $GDB_FULLPATH];
|
|
||||||
gdb_exit;
|
|
||||||
-catch "remote_file host delete $file";
|
|
||||||
+#catch "remote_file host delete $file";
|
|
||||||
|
|
||||||
if {$result < 0} then {
|
if {$result < 0} then {
|
||||||
warning "Couldn't test self"
|
warning "Couldn't test self"
|
||||||
|
|
|
@ -1,55 +0,0 @@
|
||||||
Index: gdb-6.8/gdb/testsuite/gdb.base/sepdebug.exp
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.8.orig/gdb/testsuite/gdb.base/sepdebug.exp 2008-02-26 09:14:11.000000000 +0100
|
|
||||||
+++ gdb-6.8/gdb/testsuite/gdb.base/sepdebug.exp 2008-07-14 10:26:19.000000000 +0200
|
|
||||||
@@ -981,3 +981,40 @@ if ![string compare $build_id_debug_file
|
|
||||||
# Spare debug files may confuse testsuite runs in the future.
|
|
||||||
remote_exec build "rm -f ${objdir}/${subdir}/${build_id_debug_filename}"
|
|
||||||
}
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+# Compile up a second, different, object file. Copy its debug info
|
|
||||||
+# over the top of the new debug info. Note that somewhere in the
|
|
||||||
+# above the "set debug-file-directory" variable is set to
|
|
||||||
+# ${objdir}/${subdir} so need to move things there.
|
|
||||||
+
|
|
||||||
+set existing_binfile $binfile
|
|
||||||
+set testfile "sepdebug2"
|
|
||||||
+set srcfile ${testfile}.c
|
|
||||||
+set binfile ${objdir}/${subdir}/${testfile}
|
|
||||||
+set corrupt_debug_file [separate_debug_filename $binfile]
|
|
||||||
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-w}] != "" } {
|
|
||||||
+ return -1
|
|
||||||
+}
|
|
||||||
+if [gdb_gnu_strip_debug $binfile] {
|
|
||||||
+ # check that you have a recent version of strip and objcopy installed
|
|
||||||
+ unsupported "cannot produce separate debug info files"
|
|
||||||
+ return -1
|
|
||||||
+}
|
|
||||||
+remote_exec build "cp $corrupt_debug_file ${existing_binfile}.debug"
|
|
||||||
+
|
|
||||||
+gdb_exit
|
|
||||||
+gdb_start
|
|
||||||
+gdb_reinitialize_dir $srcdir/$subdir
|
|
||||||
+gdb_load ${binfile}
|
|
||||||
+
|
|
||||||
+set test "A corrupt debug file gets a warning"
|
|
||||||
+gdb_test_multiple "file $existing_binfile" "$test" {
|
|
||||||
+ -re "warning:.*mismatch.*" {
|
|
||||||
+ pass "$test"
|
|
||||||
+ }
|
|
||||||
+ -re ".y or n. " {
|
|
||||||
+ send_gdb "y\n"
|
|
||||||
+ exp_continue
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
Index: gdb-6.8/gdb/testsuite/gdb.base/sepdebug2.c
|
|
||||||
===================================================================
|
|
||||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
|
||||||
+++ gdb-6.8/gdb/testsuite/gdb.base/sepdebug2.c 2008-07-14 10:26:19.000000000 +0200
|
|
||||||
@@ -0,0 +1,5 @@
|
|
||||||
+int
|
|
||||||
+main (int argc, char *argv[], char *envp[])
|
|
||||||
+{
|
|
||||||
+ return 0;
|
|
||||||
+}
|
|
|
@ -1,3 +1,11 @@
|
||||||
|
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jeff Johnston <jjohnstn@redhat.com>
|
||||||
|
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||||
|
Subject: gdb-6.3-threaded-watchpoints2-20050225.patch
|
||||||
|
|
||||||
|
;; Test sibling threads to set threaded watchpoints for x86 and x86-64
|
||||||
|
;;=fedoratest
|
||||||
|
|
||||||
2005-02-28 Jeff Johnston <jjohnstn@redhat.com>
|
2005-02-28 Jeff Johnston <jjohnstn@redhat.com>
|
||||||
|
|
||||||
* config/i386/nm-linux.h: Change dr register routines to
|
* config/i386/nm-linux.h: Change dr register routines to
|
||||||
|
@ -32,17 +40,20 @@
|
||||||
(amd64_linux_hw_breakpoint, amd64_linux_remove_hw_breakpoint): Ditto.
|
(amd64_linux_hw_breakpoint, amd64_linux_remove_hw_breakpoint): Ditto.
|
||||||
(amd64_linux_new_thread): Ditto.
|
(amd64_linux_new_thread): Ditto.
|
||||||
(_initialize_amd64_linux_nat): Register linux new thread observer.
|
(_initialize_amd64_linux_nat): Register linux new thread observer.
|
||||||
* testsuite/gdb.threads/watchthreads2.c: New test case.
|
* testsuite/gdb.threads/watchthreads-threaded.c: New test case.
|
||||||
* testsuite/gdb.threads/watchthreads2.exp: Ditto.
|
* testsuite/gdb.threads/watchthreads-threaded.exp: Ditto.
|
||||||
|
|
||||||
[ With recent upstream GDB (6.8) reduced only to the testcase. ]
|
[ With recent upstream GDB (6.8) reduced only to the testcase. ]
|
||||||
|
|
||||||
|
[ It was called watchthreads2.{exp,c} before but it conflicted with FSF GDB new
|
||||||
|
testcase of the same name. ]
|
||||||
|
|
||||||
FIXME: The testcase does not expects multiple watchpoints hits per one stop.
|
FIXME: The testcase does not expects multiple watchpoints hits per one stop.
|
||||||
|
|
||||||
Index: gdb-6.5/gdb/testsuite/gdb.threads/watchthreads2.c
|
diff --git a/gdb/testsuite/gdb.threads/watchthreads-threaded.c b/gdb/testsuite/gdb.threads/watchthreads-threaded.c
|
||||||
===================================================================
|
new file mode 100644
|
||||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
--- /dev/null
|
||||||
+++ gdb-6.5/gdb/testsuite/gdb.threads/watchthreads2.c 2006-07-12 01:54:29.000000000 -0300
|
+++ b/gdb/testsuite/gdb.threads/watchthreads-threaded.c
|
||||||
@@ -0,0 +1,66 @@
|
@@ -0,0 +1,66 @@
|
||||||
+/* This testcase is part of GDB, the GNU debugger.
|
+/* This testcase is part of GDB, the GNU debugger.
|
||||||
+
|
+
|
||||||
|
@ -110,11 +121,11 @@ Index: gdb-6.5/gdb/testsuite/gdb.threads/watchthreads2.c
|
||||||
+ pthread_exit(NULL);
|
+ pthread_exit(NULL);
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
Index: gdb-6.5/gdb/testsuite/gdb.threads/watchthreads2.exp
|
diff --git a/gdb/testsuite/gdb.threads/watchthreads-threaded.exp b/gdb/testsuite/gdb.threads/watchthreads-threaded.exp
|
||||||
===================================================================
|
new file mode 100644
|
||||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
--- /dev/null
|
||||||
+++ gdb-6.5/gdb/testsuite/gdb.threads/watchthreads2.exp 2006-07-12 01:54:29.000000000 -0300
|
+++ b/gdb/testsuite/gdb.threads/watchthreads-threaded.exp
|
||||||
@@ -0,0 +1,133 @@
|
@@ -0,0 +1,126 @@
|
||||||
+# This testcase is part of GDB, the GNU debugger.
|
+# This testcase is part of GDB, the GNU debugger.
|
||||||
+
|
+
|
||||||
+# Copyright 2005 Free Software Foundation, Inc.
|
+# Copyright 2005 Free Software Foundation, Inc.
|
||||||
|
@ -135,22 +146,15 @@ Index: gdb-6.5/gdb/testsuite/gdb.threads/watchthreads2.exp
|
||||||
+
|
+
|
||||||
+# Check that GDB can support multiple watchpoints across threads.
|
+# Check that GDB can support multiple watchpoints across threads.
|
||||||
+
|
+
|
||||||
+if $tracelevel {
|
|
||||||
+ strace $tracelevel
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+set prms_id 0
|
|
||||||
+set bug_id 0
|
|
||||||
+
|
|
||||||
+# This test verifies that a watchpoint is detected in the proper thread
|
+# This test verifies that a watchpoint is detected in the proper thread
|
||||||
+# so the test is only meaningful on a system with hardware watchpoints.
|
+# so the test is only meaningful on a system with hardware watchpoints.
|
||||||
+if [target_info exists gdb,no_hardware_watchpoints] {
|
+if [target_info exists gdb,no_hardware_watchpoints] {
|
||||||
+ return 0;
|
+ return 0;
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
+set testfile "watchthreads2"
|
+set testfile "watchthreads-threaded"
|
||||||
+set srcfile ${testfile}.c
|
+set srcfile ${testfile}.c
|
||||||
+set binfile ${objdir}/${subdir}/${testfile}
|
+set binfile [standard_output_file ${testfile}]
|
||||||
+if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "incdir=${objdir}"]] != "" } {
|
+if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "incdir=${objdir}"]] != "" } {
|
||||||
+ return -1
|
+ return -1
|
||||||
+}
|
+}
|
||||||
|
@ -205,13 +209,13 @@ Index: gdb-6.5/gdb/testsuite/gdb.threads/watchthreads2.exp
|
||||||
+for {set i 0} {$i < 30} {incr i} {
|
+for {set i 0} {$i < 30} {incr i} {
|
||||||
+ set test_flag 0
|
+ set test_flag 0
|
||||||
+ gdb_test_multiple "continue" "threaded watch loop" {
|
+ gdb_test_multiple "continue" "threaded watch loop" {
|
||||||
+ -re "Hardware watchpoint 3: args\\\[2\\\].*Old value = 0.*New value = 1.*main \\\(\\\) at .*watchthreads2.c:$init_line.*$gdb_prompt $"
|
+ -re "Hardware watchpoint 3: args\\\[2\\\].*Old value = 0.*New value = 1.*main \\\(\\\) at .*watchthreads-threaded.c:$init_line.*$gdb_prompt $"
|
||||||
+ { set args_2 1; set test_flag 1 }
|
+ { set args_2 1; set test_flag 1 }
|
||||||
+ -re "Hardware watchpoint 4: args\\\[3\\\].*Old value = 0.*New value = 1.*main \\\(\\\) at .*watchthreads2.c:$init_line.*$gdb_prompt $"
|
+ -re "Hardware watchpoint 4: args\\\[3\\\].*Old value = 0.*New value = 1.*main \\\(\\\) at .*watchthreads-threaded.c:$init_line.*$gdb_prompt $"
|
||||||
+ { set args_3 1; set test_flag 1 }
|
+ { set args_3 1; set test_flag 1 }
|
||||||
+ -re "Hardware watchpoint 3: args\\\[2\\\].*Old value = $args_2.*New value = [expr $args_2+1].*in thread_function \\\(arg=0x2\\\) at .*watchthreads2.c:$inc_line.*$gdb_prompt $"
|
+ -re "Hardware watchpoint 3: args\\\[2\\\].*Old value = $args_2.*New value = [expr $args_2+1].*in thread_function \\\(arg=0x2\\\) at .*watchthreads-threaded.c:$inc_line.*$gdb_prompt $"
|
||||||
+ { set args_2 [expr $args_2+1]; set test_flag 1 }
|
+ { set args_2 [expr $args_2+1]; set test_flag 1 }
|
||||||
+ -re "Hardware watchpoint 4: args\\\[3\\\].*Old value = $args_3.*New value = [expr $args_3+1].*in thread_function \\\(arg=0x3\\\) at .*watchthreads2.c:$inc_line.*$gdb_prompt $"
|
+ -re "Hardware watchpoint 4: args\\\[3\\\].*Old value = $args_3.*New value = [expr $args_3+1].*in thread_function \\\(arg=0x3\\\) at .*watchthreads-threaded.c:$inc_line.*$gdb_prompt $"
|
||||||
+ { set args_3 [expr $args_3+1]; set test_flag 1 }
|
+ { set args_3 [expr $args_3+1]; set test_flag 1 }
|
||||||
+ }
|
+ }
|
||||||
+ # If we fail above, don't bother continuing loop
|
+ # If we fail above, don't bother continuing loop
|
||||||
|
|
|
@ -1,29 +0,0 @@
|
||||||
2004-12-13 Jeff Johnston <jjohnstn@redhat.com>
|
|
||||||
|
|
||||||
* dwarf2read.c (read_type_die): Ensure that structures, unions,
|
|
||||||
enumerations, and base types create symbols.
|
|
||||||
|
|
||||||
Index: gdb-6.8/gdb/dwarf2read.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.8.orig/gdb/dwarf2read.c 2008-03-10 15:18:10.000000000 +0100
|
|
||||||
+++ gdb-6.8/gdb/dwarf2read.c 2008-07-14 10:26:01.000000000 +0200
|
|
||||||
@@ -7711,9 +7711,11 @@ read_type_die (struct die_info *die, str
|
|
||||||
case DW_TAG_structure_type:
|
|
||||||
case DW_TAG_union_type:
|
|
||||||
read_structure_type (die, cu);
|
|
||||||
+ process_structure_scope (die, cu);
|
|
||||||
break;
|
|
||||||
case DW_TAG_enumeration_type:
|
|
||||||
read_enumeration_type (die, cu);
|
|
||||||
+ process_enumeration_scope (die, cu);
|
|
||||||
break;
|
|
||||||
case DW_TAG_subprogram:
|
|
||||||
case DW_TAG_subroutine_type:
|
|
||||||
@@ -7751,6 +7753,7 @@ read_type_die (struct die_info *die, str
|
|
||||||
break;
|
|
||||||
case DW_TAG_base_type:
|
|
||||||
read_base_type (die, cu);
|
|
||||||
+ new_symbol (die, die->type, cu);
|
|
||||||
break;
|
|
||||||
case DW_TAG_unspecified_type:
|
|
||||||
read_unspecified_type (die, cu);
|
|
|
@ -1,389 +0,0 @@
|
||||||
[base]
|
|
||||||
|
|
||||||
2007-10-14 Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
||||||
|
|
||||||
Port to GDB-6.7.
|
|
||||||
|
|
||||||
Index: gdb-6.7/gdb/mi/mi-cmd-env.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.7.orig/gdb/mi/mi-cmd-env.c 2007-10-14 23:42:39.000000000 +0200
|
|
||||||
+++ gdb-6.7/gdb/mi/mi-cmd-env.c 2007-10-14 23:42:39.000000000 +0200
|
|
||||||
@@ -78,7 +78,8 @@ mi_cmd_env_pwd (char *command, char **ar
|
|
||||||
|
|
||||||
/* Otherwise the mi level is 2 or higher. */
|
|
||||||
|
|
||||||
- getcwd (gdb_dirbuf, sizeof (gdb_dirbuf));
|
|
||||||
+ /* Unused result. */
|
|
||||||
+ 1 && getcwd (gdb_dirbuf, sizeof (gdb_dirbuf));
|
|
||||||
ui_out_field_string (uiout, "cwd", gdb_dirbuf);
|
|
||||||
|
|
||||||
return MI_CMD_DONE;
|
|
||||||
Index: gdb-6.7/gdb/testsuite/gdb.base/move-dir.h
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.7.orig/gdb/testsuite/gdb.base/move-dir.h 2007-10-14 23:31:22.000000000 +0200
|
|
||||||
+++ gdb-6.7/gdb/testsuite/gdb.base/move-dir.h 2007-10-14 23:42:39.000000000 +0200
|
|
||||||
@@ -1,4 +1,4 @@
|
|
||||||
-#include <stdlib.h>
|
|
||||||
+#include <stdio.h>
|
|
||||||
|
|
||||||
void other() {
|
|
||||||
const char* ostring = "other";
|
|
||||||
Index: gdb-6.7/gdb/testsuite/gdb.base/sigrepeat.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.7.orig/gdb/testsuite/gdb.base/sigrepeat.c 2007-08-23 20:08:49.000000000 +0200
|
|
||||||
+++ gdb-6.7/gdb/testsuite/gdb.base/sigrepeat.c 2007-10-14 23:42:39.000000000 +0200
|
|
||||||
@@ -21,6 +21,7 @@
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <signal.h>
|
|
||||||
+#include <stdlib.h>
|
|
||||||
#include <sys/time.h>
|
|
||||||
|
|
||||||
static volatile int done[2];
|
|
||||||
Index: gdb-6.7/gdb/s390-tdep.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.7.orig/gdb/s390-tdep.c 2007-10-02 21:26:42.000000000 +0200
|
|
||||||
+++ gdb-6.7/gdb/s390-tdep.c 2007-10-14 23:42:39.000000000 +0200
|
|
||||||
@@ -2214,6 +2214,9 @@ s390_return_value (struct gdbarch *gdbar
|
|
||||||
case RETURN_VALUE_STRUCT_CONVENTION:
|
|
||||||
error (_("Cannot set function return value."));
|
|
||||||
break;
|
|
||||||
+
|
|
||||||
+ default:
|
|
||||||
+ break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (out)
|
|
||||||
@@ -2246,6 +2249,9 @@ s390_return_value (struct gdbarch *gdbar
|
|
||||||
case RETURN_VALUE_STRUCT_CONVENTION:
|
|
||||||
error (_("Function return value unknown."));
|
|
||||||
break;
|
|
||||||
+
|
|
||||||
+ default:
|
|
||||||
+ break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Index: gdb-6.7/gdb/f-exp.y
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.7.orig/gdb/f-exp.y 2007-06-12 17:33:03.000000000 +0200
|
|
||||||
+++ gdb-6.7/gdb/f-exp.y 2007-10-14 23:42:39.000000000 +0200
|
|
||||||
@@ -567,6 +567,8 @@ ptype : typebase
|
|
||||||
case tp_function:
|
|
||||||
follow_type = lookup_function_type (follow_type);
|
|
||||||
break;
|
|
||||||
+ default:
|
|
||||||
+ break;
|
|
||||||
}
|
|
||||||
$$ = follow_type;
|
|
||||||
}
|
|
||||||
Index: gdb-6.7/gdb/source.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.7.orig/gdb/source.c 2007-08-23 20:08:38.000000000 +0200
|
|
||||||
+++ gdb-6.7/gdb/source.c 2007-10-14 23:42:39.000000000 +0200
|
|
||||||
@@ -170,7 +170,7 @@ get_current_source_symtab_and_line (void
|
|
||||||
void
|
|
||||||
set_default_source_symtab_and_line (void)
|
|
||||||
{
|
|
||||||
- struct symtab_and_line cursal;
|
|
||||||
+ struct symtab_and_line cursal = {0};
|
|
||||||
|
|
||||||
if (!have_full_symbols () && !have_partial_symbols ())
|
|
||||||
error (_("No symbol table is loaded. Use the \"file\" command."));
|
|
||||||
@@ -1439,7 +1439,7 @@ static void
|
|
||||||
line_info (char *arg, int from_tty)
|
|
||||||
{
|
|
||||||
struct symtabs_and_lines sals;
|
|
||||||
- struct symtab_and_line sal;
|
|
||||||
+ struct symtab_and_line sal = {0};
|
|
||||||
CORE_ADDR start_pc, end_pc;
|
|
||||||
int i;
|
|
||||||
|
|
||||||
Index: gdb-6.7/gdb/linespec.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.7.orig/gdb/linespec.c 2007-10-14 23:31:03.000000000 +0200
|
|
||||||
+++ gdb-6.7/gdb/linespec.c 2007-10-14 23:53:57.000000000 +0200
|
|
||||||
@@ -1654,7 +1654,7 @@ static struct symtabs_and_lines
|
|
||||||
find_method (int funfirstline, char ***canonical, char *saved_arg,
|
|
||||||
char *copy, struct type *t, struct symbol *sym_class)
|
|
||||||
{
|
|
||||||
- struct symtabs_and_lines values;
|
|
||||||
+ struct symtabs_and_lines values = { NULL };
|
|
||||||
struct symbol *sym = NULL;
|
|
||||||
int i1; /* Counter for the symbol array. */
|
|
||||||
struct symbol **sym_arr = alloca (total_number_of_methods (t)
|
|
||||||
Index: gdb-6.7/gdb/gdb-events.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.7.orig/gdb/gdb-events.c 2007-08-23 20:08:31.000000000 +0200
|
|
||||||
+++ gdb-6.7/gdb/gdb-events.c 2007-10-14 23:42:39.000000000 +0200
|
|
||||||
@@ -319,6 +319,8 @@ gdb_events_deliver (struct gdb_events *v
|
|
||||||
case architecture_changed:
|
|
||||||
vector->architecture_changed ();
|
|
||||||
break;
|
|
||||||
+ default:
|
|
||||||
+ break;
|
|
||||||
}
|
|
||||||
delivering_events = event->next;
|
|
||||||
xfree (event);
|
|
||||||
Index: gdb-6.7/gdb/dwarf2read.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.7.orig/gdb/dwarf2read.c 2007-10-14 23:31:22.000000000 +0200
|
|
||||||
+++ gdb-6.7/gdb/dwarf2read.c 2007-10-14 23:42:39.000000000 +0200
|
|
||||||
@@ -9585,6 +9585,7 @@ dwarf_decode_macros (struct line_header
|
|
||||||
for (;;)
|
|
||||||
{
|
|
||||||
enum dwarf_macinfo_record_type macinfo_type;
|
|
||||||
+ int tmp;
|
|
||||||
|
|
||||||
/* Do we at least have room for a macinfo type byte? */
|
|
||||||
if (mac_ptr >= mac_end)
|
|
||||||
@@ -9596,13 +9597,16 @@ dwarf_decode_macros (struct line_header
|
|
||||||
macinfo_type = read_1_byte (abfd, mac_ptr);
|
|
||||||
mac_ptr++;
|
|
||||||
|
|
||||||
+ /* Check for a zero macinfo type which indicates the end of the macro
|
|
||||||
+ information. We do this as the compiler may warn us if we
|
|
||||||
+ try and look for 0 in the switch below because 0 is not
|
|
||||||
+ an enumerated value. */
|
|
||||||
+ tmp = (int)macinfo_type;
|
|
||||||
+ if (tmp == 0)
|
|
||||||
+ return;
|
|
||||||
+
|
|
||||||
switch (macinfo_type)
|
|
||||||
{
|
|
||||||
- /* A zero macinfo type indicates the end of the macro
|
|
||||||
- information. */
|
|
||||||
- case 0:
|
|
||||||
- return;
|
|
||||||
-
|
|
||||||
case DW_MACINFO_define:
|
|
||||||
case DW_MACINFO_undef:
|
|
||||||
{
|
|
||||||
Index: gdb-6.7/gdb/stabsread.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.7.orig/gdb/stabsread.c 2007-10-09 00:44:32.000000000 +0200
|
|
||||||
+++ gdb-6.7/gdb/stabsread.c 2007-10-14 23:42:39.000000000 +0200
|
|
||||||
@@ -1842,7 +1842,8 @@ again:
|
|
||||||
struct type *domain = read_type (pp, objfile);
|
|
||||||
struct type *return_type;
|
|
||||||
struct field *args;
|
|
||||||
- int nargs, varargs;
|
|
||||||
+ int nargs = 0;
|
|
||||||
+ int varargs = 0;
|
|
||||||
|
|
||||||
if (**pp != ',')
|
|
||||||
/* Invalid member type data format. */
|
|
||||||
Index: gdb-6.7/gdb/dwarf2expr.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.7.orig/gdb/dwarf2expr.c 2007-08-23 20:08:28.000000000 +0200
|
|
||||||
+++ gdb-6.7/gdb/dwarf2expr.c 2007-10-14 23:42:39.000000000 +0200
|
|
||||||
@@ -594,6 +594,8 @@ execute_stack_op (struct dwarf_expr_cont
|
|
||||||
op_ptr = read_uleb128 (op_ptr, op_end, ®);
|
|
||||||
result += reg;
|
|
||||||
break;
|
|
||||||
+ default:
|
|
||||||
+ break;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
Index: gdb-6.7/gdb/varobj.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.7.orig/gdb/varobj.c 2007-10-13 05:29:58.000000000 +0200
|
|
||||||
+++ gdb-6.7/gdb/varobj.c 2007-10-14 23:42:39.000000000 +0200
|
|
||||||
@@ -347,8 +347,7 @@ static struct language_specific language
|
|
||||||
c_value_of_variable}
|
|
||||||
,
|
|
||||||
/* C */
|
|
||||||
- {
|
|
||||||
- vlang_c,
|
|
||||||
+ {vlang_c,
|
|
||||||
c_number_of_children,
|
|
||||||
c_name_of_variable,
|
|
||||||
c_name_of_child,
|
|
||||||
@@ -360,8 +359,7 @@ static struct language_specific language
|
|
||||||
c_value_of_variable}
|
|
||||||
,
|
|
||||||
/* C++ */
|
|
||||||
- {
|
|
||||||
- vlang_cplus,
|
|
||||||
+ {vlang_cplus,
|
|
||||||
cplus_number_of_children,
|
|
||||||
cplus_name_of_variable,
|
|
||||||
cplus_name_of_child,
|
|
||||||
@@ -373,8 +371,7 @@ static struct language_specific language
|
|
||||||
cplus_value_of_variable}
|
|
||||||
,
|
|
||||||
/* Java */
|
|
||||||
- {
|
|
||||||
- vlang_java,
|
|
||||||
+ {vlang_java,
|
|
||||||
java_number_of_children,
|
|
||||||
java_name_of_variable,
|
|
||||||
java_name_of_child,
|
|
||||||
Index: gdb-6.7/gdb/doublest.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.7.orig/gdb/doublest.c 2007-08-23 20:08:28.000000000 +0200
|
|
||||||
+++ gdb-6.7/gdb/doublest.c 2007-10-14 23:42:39.000000000 +0200
|
|
||||||
@@ -92,15 +92,10 @@ get_field (const bfd_byte *data, enum fl
|
|
||||||
{
|
|
||||||
result |= (unsigned long)*(data + cur_byte) << cur_bitshift;
|
|
||||||
cur_bitshift += FLOATFORMAT_CHAR_BIT;
|
|
||||||
- switch (order)
|
|
||||||
- {
|
|
||||||
- case floatformat_little:
|
|
||||||
- ++cur_byte;
|
|
||||||
- break;
|
|
||||||
- case floatformat_big:
|
|
||||||
- --cur_byte;
|
|
||||||
- break;
|
|
||||||
- }
|
|
||||||
+ if (order == floatformat_little)
|
|
||||||
+ ++cur_byte;
|
|
||||||
+ else
|
|
||||||
+ --cur_byte;
|
|
||||||
}
|
|
||||||
if (len < sizeof(result) * FLOATFORMAT_CHAR_BIT)
|
|
||||||
/* Mask out bits which are not part of the field */
|
|
||||||
Index: gdb-6.7/gdb/cli/cli-cmds.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.7.orig/gdb/cli/cli-cmds.c 2007-08-23 20:08:47.000000000 +0200
|
|
||||||
+++ gdb-6.7/gdb/cli/cli-cmds.c 2007-10-14 23:42:39.000000000 +0200
|
|
||||||
@@ -320,7 +320,8 @@ pwd_command (char *args, int from_tty)
|
|
||||||
{
|
|
||||||
if (args)
|
|
||||||
error (_("The \"pwd\" command does not take an argument: %s"), args);
|
|
||||||
- getcwd (gdb_dirbuf, sizeof (gdb_dirbuf));
|
|
||||||
+ /* Unused result. */
|
|
||||||
+ 1 && getcwd (gdb_dirbuf, sizeof (gdb_dirbuf));
|
|
||||||
|
|
||||||
if (strcmp (gdb_dirbuf, current_directory) != 0)
|
|
||||||
printf_unfiltered (_("Working directory %s\n (canonically %s).\n"),
|
|
||||||
Index: gdb-6.7/gdb/inflow.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.7.orig/gdb/inflow.c 2007-08-23 20:08:35.000000000 +0200
|
|
||||||
+++ gdb-6.7/gdb/inflow.c 2007-10-14 23:42:39.000000000 +0200
|
|
||||||
@@ -547,17 +547,20 @@ new_tty (void)
|
|
||||||
if (tty != 0)
|
|
||||||
{
|
|
||||||
close (0);
|
|
||||||
- dup (tty);
|
|
||||||
+ /* Unused result. */
|
|
||||||
+ 1 && dup (tty);
|
|
||||||
}
|
|
||||||
if (tty != 1)
|
|
||||||
{
|
|
||||||
close (1);
|
|
||||||
- dup (tty);
|
|
||||||
+ /* Unused result. */
|
|
||||||
+ 1 && dup (tty);
|
|
||||||
}
|
|
||||||
if (tty != 2)
|
|
||||||
{
|
|
||||||
close (2);
|
|
||||||
- dup (tty);
|
|
||||||
+ /* Unused result. */
|
|
||||||
+ 1 && dup (tty);
|
|
||||||
}
|
|
||||||
if (tty > 2)
|
|
||||||
close (tty);
|
|
||||||
Index: gdb-6.7/gdb/linux-nat.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.7.orig/gdb/linux-nat.c 2007-10-14 23:31:22.000000000 +0200
|
|
||||||
+++ gdb-6.7/gdb/linux-nat.c 2007-10-14 23:42:39.000000000 +0200
|
|
||||||
@@ -2895,7 +2895,8 @@ linux_nat_info_proc_cmd (char *args, int
|
|
||||||
sprintf (fname1, "/proc/%lld/cmdline", pid);
|
|
||||||
if ((procfile = fopen (fname1, "r")) != NULL)
|
|
||||||
{
|
|
||||||
- fgets (buffer, sizeof (buffer), procfile);
|
|
||||||
+ /* Unused result. */
|
|
||||||
+ 1 && fgets (buffer, sizeof (buffer), procfile);
|
|
||||||
printf_filtered ("cmdline = '%s'\n", buffer);
|
|
||||||
fclose (procfile);
|
|
||||||
}
|
|
||||||
Index: gdb-6.7/gdb/main.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.7.orig/gdb/main.c 2007-08-23 20:08:36.000000000 +0200
|
|
||||||
+++ gdb-6.7/gdb/main.c 2007-10-14 23:42:39.000000000 +0200
|
|
||||||
@@ -193,7 +193,8 @@ captured_main (void *data)
|
|
||||||
line[0] = '\0'; /* Terminate saved (now empty) cmd line */
|
|
||||||
instream = stdin;
|
|
||||||
|
|
||||||
- getcwd (gdb_dirbuf, sizeof (gdb_dirbuf));
|
|
||||||
+ /* Unused result. */
|
|
||||||
+ 1 && getcwd (gdb_dirbuf, sizeof (gdb_dirbuf));
|
|
||||||
current_directory = gdb_dirbuf;
|
|
||||||
|
|
||||||
gdb_stdout = stdio_fileopen (stdout);
|
|
||||||
Index: gdb-6.7/gdb/top.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.7.orig/gdb/top.c 2007-10-14 23:38:27.000000000 +0200
|
|
||||||
+++ gdb-6.7/gdb/top.c 2007-10-14 23:42:39.000000000 +0200
|
|
||||||
@@ -1636,7 +1636,8 @@ gdb_init (char *argv0)
|
|
||||||
|
|
||||||
/* Run the init function of each source file */
|
|
||||||
|
|
||||||
- getcwd (gdb_dirbuf, sizeof (gdb_dirbuf));
|
|
||||||
+ /* Unused result. */
|
|
||||||
+ 1 && getcwd (gdb_dirbuf, sizeof (gdb_dirbuf));
|
|
||||||
current_directory = gdb_dirbuf;
|
|
||||||
|
|
||||||
#ifdef __MSDOS__
|
|
||||||
Index: gdb-6.7/gdb/ui-file.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.7.orig/gdb/ui-file.c 2007-08-23 20:08:46.000000000 +0200
|
|
||||||
+++ gdb-6.7/gdb/ui-file.c 2007-10-14 23:42:39.000000000 +0200
|
|
||||||
@@ -480,7 +480,8 @@ stdio_file_write (struct ui_file *file,
|
|
||||||
if (stdio->magic != &stdio_file_magic)
|
|
||||||
internal_error (__FILE__, __LINE__,
|
|
||||||
_("stdio_file_write: bad magic number"));
|
|
||||||
- fwrite (buf, length_buf, 1, stdio->file);
|
|
||||||
+ /* Unused result. */
|
|
||||||
+ 1 && fwrite (buf, length_buf, 1, stdio->file);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
Index: gdb-6.7/gdb/utils.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.7.orig/gdb/utils.c 2007-08-23 20:08:46.000000000 +0200
|
|
||||||
+++ gdb-6.7/gdb/utils.c 2007-10-14 23:42:39.000000000 +0200
|
|
||||||
@@ -716,7 +716,8 @@ internal_vproblem (struct internal_probl
|
|
||||||
abort (); /* NOTE: GDB has only three calls to abort(). */
|
|
||||||
default:
|
|
||||||
dejavu = 3;
|
|
||||||
- write (STDERR_FILENO, msg, sizeof (msg));
|
|
||||||
+ /* Unused result. */
|
|
||||||
+ 1 && write (STDERR_FILENO, msg, sizeof (msg));
|
|
||||||
exit (1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Index: gdb-6.7/gdb/gdbserver/gdbreplay.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.7.orig/gdb/gdbserver/gdbreplay.c 2007-08-23 20:08:48.000000000 +0200
|
|
||||||
+++ gdb-6.7/gdb/gdbserver/gdbreplay.c 2007-10-14 23:42:39.000000000 +0200
|
|
||||||
@@ -356,7 +356,12 @@ expect (FILE *fp)
|
|
||||||
{
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
- read (remote_desc, &fromgdb, 1);
|
|
||||||
+ if (read (remote_desc, &fromgdb, 1) != 1)
|
|
||||||
+ {
|
|
||||||
+ /* Error gets reported below. */
|
|
||||||
+ fromlog = 0;
|
|
||||||
+ break;
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
while (fromlog == fromgdb);
|
|
||||||
if (fromlog != EOL)
|
|
||||||
@@ -383,7 +388,11 @@ play (FILE *fp)
|
|
||||||
while ((fromlog = logchar (fp)) != EOL)
|
|
||||||
{
|
|
||||||
ch = fromlog;
|
|
||||||
- write (remote_desc, &ch, 1);
|
|
||||||
+ if (write (remote_desc, &ch, 1) != 1)
|
|
||||||
+ {
|
|
||||||
+ sync_error (fp, "Sync error during write of gdb packet", ch, 0);
|
|
||||||
+ break;
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,128 +0,0 @@
|
||||||
--- /dev/null 2008-04-03 00:39:30.714021604 +0200
|
|
||||||
+++ gdb-6.3/gdb/testsuite/gdb.base/watchpoint-cond-gone-stripped.c 2008-04-05 20:26:29.000000000 +0200
|
|
||||||
@@ -0,0 +1,23 @@
|
|
||||||
+/* This testcase is part of GDB, the GNU debugger.
|
|
||||||
+
|
|
||||||
+ Copyright 2008 Free Software Foundation, Inc.
|
|
||||||
+
|
|
||||||
+ This program is free software; you can redistribute it and/or modify
|
|
||||||
+ it under the terms of the GNU General Public License as published by
|
|
||||||
+ the Free Software Foundation; either version 2 of the License, or
|
|
||||||
+ (at your option) any later version.
|
|
||||||
+
|
|
||||||
+ This program is distributed in the hope that it will be useful,
|
|
||||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
+ GNU General Public License for more details.
|
|
||||||
+
|
|
||||||
+ You should have received a copy of the GNU General Public License
|
|
||||||
+ along with this program; if not, write to the Free Software
|
|
||||||
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
|
||||||
+
|
|
||||||
+void
|
|
||||||
+jumper (void (*jumpto) (void))
|
|
||||||
+{
|
|
||||||
+ (*jumpto) ();
|
|
||||||
+}
|
|
||||||
--- /dev/null 2008-04-03 00:39:30.714021604 +0200
|
|
||||||
+++ gdb-6.3/gdb/testsuite/gdb.base/watchpoint-cond-gone.c 2008-04-05 20:26:48.000000000 +0200
|
|
||||||
@@ -0,0 +1,37 @@
|
|
||||||
+/* This testcase is part of GDB, the GNU debugger.
|
|
||||||
+
|
|
||||||
+ Copyright 2008 Free Software Foundation, Inc.
|
|
||||||
+
|
|
||||||
+ This program is free software; you can redistribute it and/or modify
|
|
||||||
+ it under the terms of the GNU General Public License as published by
|
|
||||||
+ the Free Software Foundation; either version 2 of the License, or
|
|
||||||
+ (at your option) any later version.
|
|
||||||
+
|
|
||||||
+ This program is distributed in the hope that it will be useful,
|
|
||||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
+ GNU General Public License for more details.
|
|
||||||
+
|
|
||||||
+ You should have received a copy of the GNU General Public License
|
|
||||||
+ along with this program; if not, write to the Free Software
|
|
||||||
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
|
||||||
+
|
|
||||||
+extern void jumper (void (*jumpto) (void));
|
|
||||||
+
|
|
||||||
+void
|
|
||||||
+func ()
|
|
||||||
+{
|
|
||||||
+ int a, b, c;
|
|
||||||
+
|
|
||||||
+ a = b = c = 5;
|
|
||||||
+ a = b = c = 10; /* watchpoint-here */
|
|
||||||
+ c = a + b;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+int
|
|
||||||
+main ()
|
|
||||||
+{
|
|
||||||
+ jumper (func);
|
|
||||||
+
|
|
||||||
+ return 0;
|
|
||||||
+}
|
|
||||||
--- /dev/null 2008-04-03 00:39:30.714021604 +0200
|
|
||||||
+++ gdb-6.3/gdb/testsuite/gdb.base/watchpoint-cond-gone.exp 2008-04-05 20:33:19.000000000 +0200
|
|
||||||
@@ -0,0 +1,59 @@
|
|
||||||
+# Copyright 2008 Free Software Foundation, Inc.
|
|
||||||
+
|
|
||||||
+# This program is free software; you can redistribute it and/or modify
|
|
||||||
+# it under the terms of the GNU General Public License as published by
|
|
||||||
+# the Free Software Foundation; either version 2 of the License, or
|
|
||||||
+# (at your option) any later version.
|
|
||||||
+#
|
|
||||||
+# This program is distributed in the hope that it will be useful,
|
|
||||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
+# GNU General Public License for more details.
|
|
||||||
+#
|
|
||||||
+# You should have received a copy of the GNU General Public License
|
|
||||||
+# along with this program; if not, write to the Free Software
|
|
||||||
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
+
|
|
||||||
+if $tracelevel then {
|
|
||||||
+ strace $tracelevel
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+set testfile "watchpoint-cond-gone"
|
|
||||||
+set srcfile ${testfile}.c
|
|
||||||
+set srcfilestripped ${testfile}-stripped.c
|
|
||||||
+set objfilestripped ${objdir}/${subdir}/${testfile}-stripped.o
|
|
||||||
+set binfile ${objdir}/${subdir}/${testfile}
|
|
||||||
+
|
|
||||||
+# We need to generate a function without DWARF to crash older GDB.
|
|
||||||
+# Stepping into a dynamic function trampoline or stepping out of MAIN may work
|
|
||||||
+# but it is not a reliable FAIL case.
|
|
||||||
+
|
|
||||||
+if { [gdb_compile "${srcdir}/${subdir}/${srcfilestripped}" "${objfilestripped}" object {}] != "" } {
|
|
||||||
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile} ${objfilestripped}" "${binfile}" executable {debug}] != "" } {
|
|
||||||
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+gdb_exit
|
|
||||||
+gdb_start
|
|
||||||
+gdb_reinitialize_dir $srcdir/$subdir
|
|
||||||
+gdb_load ${binfile}
|
|
||||||
+
|
|
||||||
+# Problem does not occur otherwise.
|
|
||||||
+gdb_test "set can-use-hw-watchpoints 0"
|
|
||||||
+
|
|
||||||
+runto_main
|
|
||||||
+gdb_breakpoint [gdb_get_line_number "watchpoint-here"]
|
|
||||||
+gdb_continue_to_breakpoint "Place to set the watchpoint"
|
|
||||||
+
|
|
||||||
+# The condition `c == 30' is the tested culprit.
|
|
||||||
+gdb_test "watch c if c == 30" "" "Place the watchpoint"
|
|
||||||
+
|
|
||||||
+# No functionality, just to check the state.
|
|
||||||
+gdb_test "backtrace"
|
|
||||||
+
|
|
||||||
+gdb_test "finish" \
|
|
||||||
+ "Watchpoint .* deleted because the program has left the block in.*which its expression is valid..*in (jumper|func).*" \
|
|
||||||
+ "Catch the no longer valid watchpoint"
|
|
|
@ -1,9 +1,15 @@
|
||||||
Index: ./gdb/testsuite/gdb.threads/threadcrash.c
|
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||||
===================================================================
|
From: Fedora GDB patches <invalid@email.com>
|
||||||
RCS file: gdb/testsuite/gdb.threads/threadcrash.c
|
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||||
diff -N gdb/testsuite/gdb.threads/threadcrash.c
|
Subject: gdb-6.5-BEA-testsuite.patch
|
||||||
--- /dev/null 1 Jan 1970 00:00:00 -0000
|
|
||||||
+++ ./gdb/testsuite/gdb.threads/threadcrash.c 31 Oct 2006 17:54:38 -0000
|
;; Improved testsuite results by the testsuite provided by the courtesy of BEA.
|
||||||
|
;;=fedoratest: For upstream it should be rewritten as a dejagnu test, the test of no "??" was useful.
|
||||||
|
|
||||||
|
diff --git a/gdb/testsuite/gdb.threads/threadcrash.c b/gdb/testsuite/gdb.threads/threadcrash.c
|
||||||
|
new file mode 100644
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/gdb/testsuite/gdb.threads/threadcrash.c
|
||||||
@@ -0,0 +1,301 @@
|
@@ -0,0 +1,301 @@
|
||||||
+/*
|
+/*
|
||||||
+ * The point of this program is to crash in a multi-threaded app.
|
+ * The point of this program is to crash in a multi-threaded app.
|
||||||
|
@ -306,12 +312,10 @@ diff -N gdb/testsuite/gdb.threads/threadcrash.c
|
||||||
+
|
+
|
||||||
+ return 0;
|
+ return 0;
|
||||||
+}
|
+}
|
||||||
Index: ./gdb/testsuite/gdb.threads/threadcrash.exp
|
diff --git a/gdb/testsuite/gdb.threads/threadcrash.exp b/gdb/testsuite/gdb.threads/threadcrash.exp
|
||||||
===================================================================
|
new file mode 100644
|
||||||
RCS file: gdb/testsuite/gdb.threads/threadcrash.exp
|
--- /dev/null
|
||||||
diff -N gdb/testsuite/gdb.threads/threadcrash.exp
|
+++ b/gdb/testsuite/gdb.threads/threadcrash.exp
|
||||||
--- /dev/null 1 Jan 1970 00:00:00 -0000
|
|
||||||
+++ ./gdb/testsuite/gdb.threads/threadcrash.exp 31 Oct 2006 17:54:38 -0000
|
|
||||||
@@ -0,0 +1,37 @@
|
@@ -0,0 +1,37 @@
|
||||||
+# threadcrash.exp - The point of this program is to crash in a multi-threaded app.
|
+# threadcrash.exp - The point of this program is to crash in a multi-threaded app.
|
||||||
+
|
+
|
||||||
|
@ -319,7 +323,7 @@ diff -N gdb/testsuite/gdb.threads/threadcrash.exp
|
||||||
+set testfile threadcrash
|
+set testfile threadcrash
|
||||||
+set srcfile ${testfile}.c
|
+set srcfile ${testfile}.c
|
||||||
+set shellfile ${srcdir}/${subdir}/${testfile}.sh
|
+set shellfile ${srcdir}/${subdir}/${testfile}.sh
|
||||||
+set binfile ${objdir}/${subdir}/${testfile}
|
+set binfile [standard_output_file ${testfile}]
|
||||||
+
|
+
|
||||||
+set GDB_abs ${GDB}
|
+set GDB_abs ${GDB}
|
||||||
+if [regexp "^\[^/\]" ${GDB_abs}] {
|
+if [regexp "^\[^/\]" ${GDB_abs}] {
|
||||||
|
@ -337,7 +341,7 @@ diff -N gdb/testsuite/gdb.threads/threadcrash.exp
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
+# ${shellfile} argument must not contain any directories.
|
+# ${shellfile} argument must not contain any directories.
|
||||||
+set fd [open "|bash ${shellfile} ${binfile} $GDB -nw $GDBFLAGS" r]
|
+set fd [open "|bash ${shellfile} ${binfile} $GDB $INTERNAL_GDBFLAGS $GDBFLAGS [host_info gdb_opts]" r]
|
||||||
+while { [gets $fd line] >= 0 } {
|
+while { [gets $fd line] >= 0 } {
|
||||||
+ if [regexp " PASS: (.*)$" $line trash message] {
|
+ if [regexp " PASS: (.*)$" $line trash message] {
|
||||||
+ pass $message
|
+ pass $message
|
||||||
|
@ -350,12 +354,10 @@ diff -N gdb/testsuite/gdb.threads/threadcrash.exp
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
+return 0
|
+return 0
|
||||||
Index: ./gdb/testsuite/gdb.threads/threadcrash.sh
|
diff --git a/gdb/testsuite/gdb.threads/threadcrash.sh b/gdb/testsuite/gdb.threads/threadcrash.sh
|
||||||
===================================================================
|
new file mode 100644
|
||||||
RCS file: gdb/testsuite/gdb.threads/threadcrash.sh
|
--- /dev/null
|
||||||
diff -N gdb/testsuite/gdb.threads/threadcrash.sh
|
+++ b/gdb/testsuite/gdb.threads/threadcrash.sh
|
||||||
--- /dev/null 1 Jan 1970 00:00:00 -0000
|
|
||||||
+++ ./gdb/testsuite/gdb.threads/threadcrash.sh 31 Oct 2006 17:54:38 -0000
|
|
||||||
@@ -0,0 +1,324 @@
|
@@ -0,0 +1,324 @@
|
||||||
+#! /bin/bash
|
+#! /bin/bash
|
||||||
+
|
+
|
||||||
|
@ -480,7 +482,7 @@ diff -N gdb/testsuite/gdb.threads/threadcrash.sh
|
||||||
+ local FAILURES=0
|
+ local FAILURES=0
|
||||||
+
|
+
|
||||||
+ mustNotHave '??' || ((FAILURES++))
|
+ mustNotHave '??' || ((FAILURES++))
|
||||||
+ mustHaveCorrectAmount 12 threadcrash.c: || ((FAILURES++))
|
+ mustHaveCorrectAmount 11 threadcrash.c: || ((FAILURES++))
|
||||||
+
|
+
|
||||||
+ mustHaveSevenThreads || ((FAILURES++))
|
+ mustHaveSevenThreads || ((FAILURES++))
|
||||||
+ mustHaveSequence sleep "makeSyscall (ignored=" || ((FAILURES++))
|
+ mustHaveSequence sleep "makeSyscall (ignored=" || ((FAILURES++))
|
||||||
|
@ -681,12 +683,10 @@ diff -N gdb/testsuite/gdb.threads/threadcrash.sh
|
||||||
+rm -rf $WORKDIR
|
+rm -rf $WORKDIR
|
||||||
+
|
+
|
||||||
+exit $FAILURES
|
+exit $FAILURES
|
||||||
Index: ./gdb/testsuite/gdb.threads/threadcrash.sh-orig
|
diff --git a/gdb/testsuite/gdb.threads/threadcrash.sh-orig b/gdb/testsuite/gdb.threads/threadcrash.sh-orig
|
||||||
===================================================================
|
new file mode 100644
|
||||||
RCS file: gdb/testsuite/gdb.threads/threadcrash.sh-orig
|
--- /dev/null
|
||||||
diff -N gdb/testsuite/gdb.threads/threadcrash.sh-orig
|
+++ b/gdb/testsuite/gdb.threads/threadcrash.sh-orig
|
||||||
--- /dev/null 1 Jan 1970 00:00:00 -0000
|
|
||||||
+++ ./gdb/testsuite/gdb.threads/threadcrash.sh-orig 31 Oct 2006 17:54:38 -0000
|
|
||||||
@@ -0,0 +1,248 @@
|
@@ -0,0 +1,248 @@
|
||||||
+#! /bin/bash
|
+#! /bin/bash
|
||||||
+
|
+
|
||||||
|
|
|
@ -1,3 +1,11 @@
|
||||||
|
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||||
|
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||||
|
Subject: gdb-6.5-bz109921-DW_AT_decl_file-test.patch
|
||||||
|
|
||||||
|
;; Find symbols properly at their original (included) file (BZ 109921).
|
||||||
|
;;=fedoratest
|
||||||
|
|
||||||
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=109921
|
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=109921
|
||||||
|
|
||||||
It is duplicite to its upstream variant:
|
It is duplicite to its upstream variant:
|
||||||
|
@ -16,8 +24,10 @@ http://sourceware.org/ml/gdb-patches/2007-01/msg00434.html
|
||||||
* gdb.dwarf2/dw2-included.exp, gdb.dwarf2/dw2-included.c,
|
* gdb.dwarf2/dw2-included.exp, gdb.dwarf2/dw2-included.c,
|
||||||
gdb.dwarf2/dw2-included.h: New files.
|
gdb.dwarf2/dw2-included.h: New files.
|
||||||
|
|
||||||
--- /dev/null 1 Jan 1970 00:00:00 -0000
|
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-included.c b/gdb/testsuite/gdb.dwarf2/dw2-included.c
|
||||||
+++ ./gdb/testsuite/gdb.dwarf2/dw2-included.c 2 Jan 2007 00:20:27 -0000
|
new file mode 100644
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/gdb/testsuite/gdb.dwarf2/dw2-included.c
|
||||||
@@ -0,0 +1,26 @@
|
@@ -0,0 +1,26 @@
|
||||||
+/* This testcase is part of GDB, the GNU debugger.
|
+/* This testcase is part of GDB, the GNU debugger.
|
||||||
+
|
+
|
||||||
|
@ -45,8 +55,10 @@ http://sourceware.org/ml/gdb-patches/2007-01/msg00434.html
|
||||||
+{
|
+{
|
||||||
+ return 0;
|
+ return 0;
|
||||||
+}
|
+}
|
||||||
--- /dev/null 1 Jan 1970 00:00:00 -0000
|
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-included.exp b/gdb/testsuite/gdb.dwarf2/dw2-included.exp
|
||||||
+++ ./gdb/testsuite/gdb.dwarf2/dw2-included.exp 2 Jan 2007 00:20:27 -0000
|
new file mode 100644
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/gdb/testsuite/gdb.dwarf2/dw2-included.exp
|
||||||
@@ -0,0 +1,47 @@
|
@@ -0,0 +1,47 @@
|
||||||
+# Copyright 2006 Free Software Foundation, Inc.
|
+# Copyright 2006 Free Software Foundation, Inc.
|
||||||
+
|
+
|
||||||
|
@ -79,7 +91,7 @@ http://sourceware.org/ml/gdb-patches/2007-01/msg00434.html
|
||||||
+
|
+
|
||||||
+set testfile "dw2-included"
|
+set testfile "dw2-included"
|
||||||
+set srcfile ${testfile}.c
|
+set srcfile ${testfile}.c
|
||||||
+set binfile ${objdir}/${subdir}/${testfile}
|
+set binfile [standard_output_file ${testfile}]
|
||||||
+
|
+
|
||||||
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
|
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
|
||||||
+ return -1
|
+ return -1
|
||||||
|
@ -94,9 +106,11 @@ http://sourceware.org/ml/gdb-patches/2007-01/msg00434.html
|
||||||
+gdb_test "list integer" "int integer;\r"
|
+gdb_test "list integer" "int integer;\r"
|
||||||
+gdb_test "ptype integer" "type = int\r"
|
+gdb_test "ptype integer" "type = int\r"
|
||||||
+# Path varies depending on the build location.
|
+# Path varies depending on the build location.
|
||||||
+gdb_test "info variables integer" "\r\nFile \[^\r\n\]*/gdb.dwarf2/dw2-included.h:\r\nint integer;\r"
|
+gdb_test "info variables integer" "\r\nFile \[^\r\n\]*/gdb.dwarf2/dw2-included.h:\r\n${decimal}:.*int integer;\r"
|
||||||
--- /dev/null 1 Jan 1970 00:00:00 -0000
|
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-included.h b/gdb/testsuite/gdb.dwarf2/dw2-included.h
|
||||||
+++ ./gdb/testsuite/gdb.dwarf2/dw2-included.h 2 Jan 2007 00:20:27 -0000
|
new file mode 100644
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/gdb/testsuite/gdb.dwarf2/dw2-included.h
|
||||||
@@ -0,0 +1,20 @@
|
@@ -0,0 +1,20 @@
|
||||||
+/* This testcase is part of GDB, the GNU debugger.
|
+/* This testcase is part of GDB, the GNU debugger.
|
||||||
+
|
+
|
||||||
|
|
|
@ -1,197 +0,0 @@
|
||||||
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=181390
|
|
||||||
|
|
||||||
2006-09-28 Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
||||||
|
|
||||||
* gdb/utils.c (paddress): Disable cutting of the printed addresses
|
|
||||||
to the target's address bit size; user wants to see everything.
|
|
||||||
* gdb/value.c (value_as_address_core): Original `value_as_address'.
|
|
||||||
(value_as_address): New `value_as_address' wrapper - cut memory address
|
|
||||||
to the target's address bit size, bugreport by John Reiser.
|
|
||||||
|
|
||||||
2008-03-02 Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
||||||
|
|
||||||
Port to GDB-6.8pre.
|
|
||||||
New testcase `gdb.arch/amd64-i386-address.exp'.
|
|
||||||
|
|
||||||
Index: gdb-6.7.50.20080227/gdb/utils.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.7.50.20080227.orig/gdb/utils.c 2008-03-02 14:28:44.000000000 +0100
|
|
||||||
+++ gdb-6.7.50.20080227/gdb/utils.c 2008-03-02 14:35:09.000000000 +0100
|
|
||||||
@@ -2540,6 +2540,14 @@ paddr_nz (CORE_ADDR addr)
|
|
||||||
const char *
|
|
||||||
paddress (CORE_ADDR addr)
|
|
||||||
{
|
|
||||||
+ /* Do not cut the address as the user should see all the information
|
|
||||||
+ available. Otherwise 64-bit gdb debugging 32-bit inferior would
|
|
||||||
+ report for `x/x 0xffffffffffffce70' error
|
|
||||||
+ `Cannot access memory at 0xffffce70' while the error occured just
|
|
||||||
+ because of the higher order bits 0xffffffff00000000 there.
|
|
||||||
+ This specific error no longer occurs as the address is now cut
|
|
||||||
+ during execution by `value_as_address'. */
|
|
||||||
+#if 0
|
|
||||||
/* Truncate address to the size of a target address, avoiding shifts
|
|
||||||
larger or equal than the width of a CORE_ADDR. The local
|
|
||||||
variable ADDR_BIT stops the compiler reporting a shift overflow
|
|
||||||
@@ -2553,6 +2561,8 @@ paddress (CORE_ADDR addr)
|
|
||||||
|
|
||||||
if (addr_bit < (sizeof (CORE_ADDR) * HOST_CHAR_BIT))
|
|
||||||
addr &= ((CORE_ADDR) 1 << addr_bit) - 1;
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
return hex_string (addr);
|
|
||||||
}
|
|
||||||
|
|
||||||
Index: gdb-6.7.50.20080227/gdb/value.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.7.50.20080227.orig/gdb/value.c 2008-01-18 18:07:40.000000000 +0100
|
|
||||||
+++ gdb-6.7.50.20080227/gdb/value.c 2008-03-02 14:36:38.000000000 +0100
|
|
||||||
@@ -983,11 +983,9 @@ value_as_double (struct value *val)
|
|
||||||
return foo;
|
|
||||||
}
|
|
||||||
|
|
||||||
-/* Extract a value as a C pointer. Does not deallocate the value.
|
|
||||||
- Note that val's type may not actually be a pointer; value_as_long
|
|
||||||
- handles all the cases. */
|
|
||||||
-CORE_ADDR
|
|
||||||
-value_as_address (struct value *val)
|
|
||||||
+/* See `value_as_address' below - core of value to C pointer extraction. */
|
|
||||||
+static CORE_ADDR
|
|
||||||
+value_as_address_core (struct value *val)
|
|
||||||
{
|
|
||||||
/* Assume a CORE_ADDR can fit in a LONGEST (for now). Not sure
|
|
||||||
whether we want this to be true eventually. */
|
|
||||||
@@ -1087,6 +1085,34 @@ value_as_address (struct value *val)
|
|
||||||
return unpack_long (value_type (val), value_contents (val));
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
+
|
|
||||||
+/* Extract a value as a C pointer. Does not deallocate the value.
|
|
||||||
+ Note that val's type may not actually be a pointer; value_as_long
|
|
||||||
+ handles all the cases. */
|
|
||||||
+CORE_ADDR
|
|
||||||
+value_as_address (struct value *val)
|
|
||||||
+{
|
|
||||||
+ CORE_ADDR addr;
|
|
||||||
+ int addr_bit;
|
|
||||||
+
|
|
||||||
+ addr = value_as_address_core (val);
|
|
||||||
+
|
|
||||||
+ /* Truncate address to the size of a target address, avoiding shifts
|
|
||||||
+ larger or equal than the width of a CORE_ADDR. The local
|
|
||||||
+ variable ADDR_BIT stops the compiler reporting a shift overflow
|
|
||||||
+ when it won't occur. */
|
|
||||||
+ /* NOTE: This assumes that the significant address information is
|
|
||||||
+ kept in the least significant bits of ADDR - the upper bits were
|
|
||||||
+ either zero or sign extended. Should ADDRESS_TO_POINTER() or
|
|
||||||
+ some ADDRESS_TO_PRINTABLE() be used to do the conversion? */
|
|
||||||
+
|
|
||||||
+ addr_bit = gdbarch_addr_bit (current_gdbarch);
|
|
||||||
+
|
|
||||||
+ if (addr_bit < (sizeof (CORE_ADDR) * HOST_CHAR_BIT))
|
|
||||||
+ addr &= ((CORE_ADDR) 1 << addr_bit) - 1;
|
|
||||||
+
|
|
||||||
+ return addr;
|
|
||||||
+}
|
|
||||||
|
|
||||||
/* Unpack raw data (copied from debugee, target byte order) at VALADDR
|
|
||||||
as a long, or as a double, assuming the raw data is described
|
|
||||||
--- /dev/null 2008-03-01 10:30:54.797374318 +0100
|
|
||||||
+++ gdb-6.7.50.20080227/gdb/testsuite/gdb.arch/amd64-i386-address.S 2008-03-02 12:47:06.000000000 +0100
|
|
||||||
@@ -0,0 +1,32 @@
|
|
||||||
+/* Copyright 2008 Free Software Foundation, Inc.
|
|
||||||
+
|
|
||||||
+ This program is free software; you can redistribute it and/or modify
|
|
||||||
+ it under the terms of the GNU General Public License as published by
|
|
||||||
+ the Free Software Foundation; either version 3 of the License, or
|
|
||||||
+ (at your option) any later version.
|
|
||||||
+
|
|
||||||
+ This program is distributed in the hope that it will be useful,
|
|
||||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
+ GNU General Public License for more details.
|
|
||||||
+
|
|
||||||
+ You should have received a copy of the GNU General Public License
|
|
||||||
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
+
|
|
||||||
+ Please email any bugs, comments, and/or additions to this file to:
|
|
||||||
+ bug-gdb@gnu.org
|
|
||||||
+
|
|
||||||
+ This file is part of the gdb testsuite.
|
|
||||||
+
|
|
||||||
+ Test UNsigned extension of the 32-bit inferior address on a 64-bit host.
|
|
||||||
+ This file is based on the work by John Reiser.
|
|
||||||
+ This file was created by Jan Kratochvil <jan.kratochvil@redhat.com>.
|
|
||||||
+ https://bugzilla.redhat.com/show_bug.cgi?id=181390 */
|
|
||||||
+
|
|
||||||
+_start: .globl _start
|
|
||||||
+ nop
|
|
||||||
+ int3
|
|
||||||
+ movl %esp,%ebx
|
|
||||||
+ int3 # examining memory from $ebx fails, from $esp succeeds
|
|
||||||
+ nop
|
|
||||||
+ nop
|
|
||||||
--- /dev/null 2008-03-01 10:30:54.797374318 +0100
|
|
||||||
+++ gdb-6.7.50.20080227/gdb/testsuite/gdb.arch/amd64-i386-address.exp 2008-03-02 12:57:11.000000000 +0100
|
|
||||||
@@ -0,0 +1,62 @@
|
|
||||||
+# Copyright 2008 Free Software Foundation, Inc.
|
|
||||||
+
|
|
||||||
+# This program is free software; you can redistribute it and/or modify
|
|
||||||
+# it under the terms of the GNU General Public License as published by
|
|
||||||
+# the Free Software Foundation; either version 3 of the License, or
|
|
||||||
+# (at your option) any later version.
|
|
||||||
+#
|
|
||||||
+# This program is distributed in the hope that it will be useful,
|
|
||||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
+# GNU General Public License for more details.
|
|
||||||
+#
|
|
||||||
+# You should have received a copy of the GNU General Public License
|
|
||||||
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
+
|
|
||||||
+# Please email any bugs, comments, and/or additions to this file to:
|
|
||||||
+# bug-gdb@gnu.org
|
|
||||||
+
|
|
||||||
+# This file is part of the gdb testsuite.
|
|
||||||
+
|
|
||||||
+# Test UNsigned extension of the 32-bit inferior address on a 64-bit host.
|
|
||||||
+# This file is based on the work by John Reiser.
|
|
||||||
+# This file was created by Jan Kratochvil <jan.kratochvil@redhat.com>.
|
|
||||||
+# https://bugzilla.redhat.com/show_bug.cgi?id=181390
|
|
||||||
+
|
|
||||||
+if {![istarget "x86_64-*-*"]} then {
|
|
||||||
+ verbose "Skipping amd64->i386 adress test."
|
|
||||||
+ return
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+set testfile "amd64-i386-address"
|
|
||||||
+set srcfile ${testfile}.S
|
|
||||||
+set binfile ${objdir}/${subdir}/${testfile}
|
|
||||||
+
|
|
||||||
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "additional_flags=-m32 -nostdlib"]] != "" } {
|
|
||||||
+ untested amd64-i386-address.exp
|
|
||||||
+ return -1
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+# Get things started.
|
|
||||||
+
|
|
||||||
+gdb_exit
|
|
||||||
+gdb_start
|
|
||||||
+gdb_reinitialize_dir $srcdir/$subdir
|
|
||||||
+gdb_load ${binfile}
|
|
||||||
+
|
|
||||||
+gdb_run_cmd
|
|
||||||
+
|
|
||||||
+set test "trap stop"
|
|
||||||
+gdb_test_multiple "" $test {
|
|
||||||
+ -re "Program received signal SIGTRAP,.*_start .*$gdb_prompt $" {
|
|
||||||
+ pass $test
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+gdb_test "stepi" ".*_start .*int3.*"
|
|
||||||
+
|
|
||||||
+gdb_test "x/x \$esp" "0x\[0-9a-f\]*:\t0x0*1"
|
|
||||||
+
|
|
||||||
+# Failure case would be:
|
|
||||||
+# 0xff8d7f00: Cannot access memory at address 0xff8d7f00
|
|
||||||
+gdb_test "x/x \$ebx" "0x\[0-9a-f\]*:\t0x0*1"
|
|
|
@ -1,3 +1,11 @@
|
||||||
|
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||||
|
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||||
|
Subject: gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch
|
||||||
|
|
||||||
|
;; Support TLS symbols (+`errno' suggestion if no pthread is found) (BZ 185337).
|
||||||
|
;;=push+jan: It should be replaced by Infinity project.
|
||||||
|
|
||||||
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=185337
|
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=185337
|
||||||
|
|
||||||
2008-02-24 Jan Kratochvil <jan.kratochvil@redhat.com>
|
2008-02-24 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||||
|
@ -19,7 +27,10 @@ will get:
|
||||||
Attached suggestion patch how to deal with the most common "errno" symbol
|
Attached suggestion patch how to deal with the most common "errno" symbol
|
||||||
for the most common under-ggdb3 compiled programs.
|
for the most common under-ggdb3 compiled programs.
|
||||||
|
|
||||||
|
Original patch hooked into target_translate_tls_address. But its inferior
|
||||||
|
call invalidates `struct frame *' in the callers - RH BZ 690908.
|
||||||
|
|
||||||
|
https://bugzilla.redhat.com/show_bug.cgi?id=1166549
|
||||||
|
|
||||||
2007-11-03 Jan Kratochvil <jan.kratochvil@redhat.com>
|
2007-11-03 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||||
|
|
||||||
|
@ -30,188 +41,24 @@ glibc-debuginfo-2.7-2.x86_64: /usr/lib/debug/lib64/libc.so.6.debug:
|
||||||
<81a2> DW_AT_name : (indirect string, offset: 0x280e): __errno_location
|
<81a2> DW_AT_name : (indirect string, offset: 0x280e): __errno_location
|
||||||
<81a8> DW_AT_MIPS_linkage_name: (indirect string, offset: 0x2808): *__GI___errno_location
|
<81a8> DW_AT_MIPS_linkage_name: (indirect string, offset: 0x2808): *__GI___errno_location
|
||||||
|
|
||||||
Index: gdb-6.8cvs20080219/gdb/dwarf2read.c
|
diff --git a/gdb/printcmd.c b/gdb/printcmd.c
|
||||||
===================================================================
|
--- a/gdb/printcmd.c
|
||||||
--- gdb-6.8cvs20080219.orig/gdb/dwarf2read.c 2008-02-19 17:27:21.000000000 +0100
|
+++ b/gdb/printcmd.c
|
||||||
+++ gdb-6.8cvs20080219/gdb/dwarf2read.c 2008-02-20 13:35:19.000000000 +0100
|
@@ -1210,6 +1210,10 @@ print_command_1 (const char *args, int voidprint)
|
||||||
@@ -5679,8 +5679,8 @@ read_partial_die (struct partial_die_inf
|
|
||||||
|
if (exp != nullptr && *exp)
|
||||||
{
|
{
|
||||||
case DW_AT_name:
|
+ /* '*((int *(*) (void)) __errno_location) ()' is incompatible with
|
||||||
|
+ function descriptors. */
|
||||||
- /* Prefer DW_AT_MIPS_linkage_name over DW_AT_name. */
|
+ if (target_has_execution && strcmp (exp, "errno") == 0)
|
||||||
- if (part_die->name == NULL)
|
+ exp = "*(*(int *(*)(void)) __errno_location) ()";
|
||||||
+ /* Prefer DW_AT_MIPS_linkage_name over DW_AT_name for non-C. */
|
expression_up expr = parse_expression (exp);
|
||||||
+ if (cu->language == language_c || part_die->name == NULL)
|
val = evaluate_expression (expr.get ());
|
||||||
part_die->name = DW_STRING (&attr);
|
|
||||||
break;
|
|
||||||
case DW_AT_comp_dir:
|
|
||||||
@@ -5688,7 +5688,9 @@ read_partial_die (struct partial_die_inf
|
|
||||||
part_die->dirname = DW_STRING (&attr);
|
|
||||||
break;
|
|
||||||
case DW_AT_MIPS_linkage_name:
|
|
||||||
- part_die->name = DW_STRING (&attr);
|
|
||||||
+ /* Prefer DW_AT_MIPS_linkage_name over DW_AT_name for non-C. */
|
|
||||||
+ if (cu->language != language_c || part_die->name == NULL)
|
|
||||||
+ part_die->name = DW_STRING (&attr);
|
|
||||||
break;
|
|
||||||
case DW_AT_low_pc:
|
|
||||||
has_low_pc_attr = 1;
|
|
||||||
@@ -7936,9 +7938,13 @@ dwarf2_linkage_name (struct die_info *di
|
|
||||||
{
|
|
||||||
struct attribute *attr;
|
|
||||||
|
|
||||||
- attr = dwarf2_attr (die, DW_AT_MIPS_linkage_name, cu);
|
|
||||||
- if (attr && DW_STRING (attr))
|
|
||||||
- return DW_STRING (attr);
|
|
||||||
+ /* Prefer DW_AT_MIPS_linkage_name over DW_AT_name for non-C. */
|
|
||||||
+ if (cu->language != language_c)
|
|
||||||
+ {
|
|
||||||
+ attr = dwarf2_attr (die, DW_AT_MIPS_linkage_name, cu);
|
|
||||||
+ if (attr && DW_STRING (attr))
|
|
||||||
+ return DW_STRING (attr);
|
|
||||||
+ }
|
|
||||||
attr = dwarf2_attr (die, DW_AT_name, cu);
|
|
||||||
if (attr && DW_STRING (attr))
|
|
||||||
return DW_STRING (attr);
|
|
||||||
Index: gdb-6.8cvs20080219/gdb/gdbtypes.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.8cvs20080219.orig/gdb/gdbtypes.c 2008-02-14 23:03:57.000000000 +0100
|
|
||||||
+++ gdb-6.8cvs20080219/gdb/gdbtypes.c 2008-02-20 13:35:19.000000000 +0100
|
|
||||||
@@ -3106,6 +3106,8 @@ gdbtypes_post_init (struct gdbarch *gdba
|
|
||||||
init_type (TYPE_CODE_INT,
|
|
||||||
gdbarch_int_bit (gdbarch) / TARGET_CHAR_BIT,
|
|
||||||
0, "int", (struct objfile *) NULL);
|
|
||||||
+ builtin_type->builtin_int_ptr =
|
|
||||||
+ make_pointer_type (builtin_type->builtin_int, NULL);
|
|
||||||
builtin_type->builtin_unsigned_int =
|
|
||||||
init_type (TYPE_CODE_INT,
|
|
||||||
gdbarch_int_bit (gdbarch) / TARGET_CHAR_BIT,
|
|
||||||
@@ -3215,6 +3217,11 @@ gdbtypes_post_init (struct gdbarch *gdba
|
|
||||||
"<text variable, no debug info>", NULL);
|
|
||||||
TYPE_TARGET_TYPE (builtin_type->nodebug_text_symbol) =
|
|
||||||
builtin_type->builtin_int;
|
|
||||||
+ builtin_type->nodebug_text_symbol_errno_location =
|
|
||||||
+ init_type (TYPE_CODE_FUNC, 1, 0,
|
|
||||||
+ "<text variable for __errno_location, no debug info>", NULL);
|
|
||||||
+ TYPE_TARGET_TYPE (builtin_type->nodebug_text_symbol_errno_location) =
|
|
||||||
+ builtin_type->builtin_int_ptr;
|
|
||||||
builtin_type->nodebug_data_symbol =
|
|
||||||
init_type (TYPE_CODE_INT,
|
|
||||||
gdbarch_int_bit (gdbarch) / HOST_CHAR_BIT, 0,
|
|
||||||
Index: gdb-6.8cvs20080219/gdb/gdbtypes.h
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.8cvs20080219.orig/gdb/gdbtypes.h 2008-02-14 23:03:57.000000000 +0100
|
|
||||||
+++ gdb-6.8cvs20080219/gdb/gdbtypes.h 2008-02-20 13:35:19.000000000 +0100
|
|
||||||
@@ -942,6 +942,7 @@ struct builtin_type
|
|
||||||
|
|
||||||
/* Types used for symbols with no debug information. */
|
|
||||||
struct type *nodebug_text_symbol;
|
|
||||||
+ struct type *nodebug_text_symbol_errno_location;
|
|
||||||
struct type *nodebug_data_symbol;
|
|
||||||
struct type *nodebug_unknown_symbol;
|
|
||||||
struct type *nodebug_tls_symbol;
|
|
||||||
@@ -960,6 +961,7 @@ struct builtin_type
|
|
||||||
struct type *builtin_char;
|
|
||||||
struct type *builtin_short;
|
|
||||||
struct type *builtin_int;
|
|
||||||
+ struct type *builtin_int_ptr;
|
|
||||||
struct type *builtin_long;
|
|
||||||
struct type *builtin_signed_char;
|
|
||||||
struct type *builtin_unsigned_char;
|
|
||||||
Index: gdb-6.8cvs20080219/gdb/parse.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.8cvs20080219.orig/gdb/parse.c 2008-01-02 00:04:03.000000000 +0100
|
|
||||||
+++ gdb-6.8cvs20080219/gdb/parse.c 2008-02-20 13:35:19.000000000 +0100
|
|
||||||
@@ -437,7 +437,12 @@ write_exp_msymbol (struct minimal_symbol
|
|
||||||
case mst_text:
|
|
||||||
case mst_file_text:
|
|
||||||
case mst_solib_trampoline:
|
|
||||||
- write_exp_elt_type (builtin_type (gdbarch)->nodebug_text_symbol);
|
|
||||||
+ if (builtin_type (gdbarch)->nodebug_text_symbol_errno_location != NULL
|
|
||||||
+ && strcmp (SYMBOL_LINKAGE_NAME (msymbol), "__errno_location") == 0)
|
|
||||||
+ write_exp_elt_type (builtin_type (gdbarch)
|
|
||||||
+ ->nodebug_text_symbol_errno_location);
|
|
||||||
+ else
|
|
||||||
+ write_exp_elt_type (builtin_type (gdbarch)->nodebug_text_symbol);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case mst_data:
|
|
||||||
Index: gdb-6.8cvs20080219/gdb/target.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.8cvs20080219.orig/gdb/target.c 2008-02-19 17:22:33.000000000 +0100
|
|
||||||
+++ gdb-6.8cvs20080219/gdb/target.c 2008-02-20 13:36:17.000000000 +0100
|
|
||||||
@@ -812,6 +812,25 @@ pop_target (void)
|
|
||||||
internal_error (__FILE__, __LINE__, _("failed internal consistency check"));
|
|
||||||
}
|
}
|
||||||
|
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-errno.c b/gdb/testsuite/gdb.dwarf2/dw2-errno.c
|
||||||
+static int
|
new file mode 100644
|
||||||
+resolve_errno (void *arg)
|
--- /dev/null
|
||||||
+{
|
+++ b/gdb/testsuite/gdb.dwarf2/dw2-errno.c
|
||||||
+ CORE_ADDR *arg_addr = arg;
|
|
||||||
+ struct expression *expr;
|
|
||||||
+ struct cleanup *old_chain = 0;
|
|
||||||
+ struct value *val;
|
|
||||||
+
|
|
||||||
+ expr = parse_expression ("__errno_location()");
|
|
||||||
+ old_chain = make_cleanup (free_current_contents, &expr);
|
|
||||||
+ val = evaluate_expression (expr);
|
|
||||||
+ *arg_addr = value_as_address (val);
|
|
||||||
+ release_value (val);
|
|
||||||
+ value_free (val);
|
|
||||||
+ do_cleanups (old_chain);
|
|
||||||
+
|
|
||||||
+ return 1;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
/* Using the objfile specified in OBJFILE, find the address for the
|
|
||||||
current thread's thread-local storage with offset OFFSET. */
|
|
||||||
CORE_ADDR
|
|
||||||
@@ -893,7 +912,28 @@ target_translate_tls_address (struct obj
|
|
||||||
/* It wouldn't be wrong here to try a gdbarch method, too; finding
|
|
||||||
TLS is an ABI-specific thing. But we don't do that yet. */
|
|
||||||
else
|
|
||||||
- error (_("Cannot find thread-local variables on this target"));
|
|
||||||
+ {
|
|
||||||
+ struct minimal_symbol *msymbol;
|
|
||||||
+
|
|
||||||
+ msymbol = lookup_minimal_symbol ("errno", NULL, NULL);
|
|
||||||
+ if (msymbol != NULL
|
|
||||||
+ && SYMBOL_VALUE_ADDRESS (msymbol) == offset
|
|
||||||
+ && (SYMBOL_BFD_SECTION (msymbol)->owner == objfile->obfd
|
|
||||||
+ || (objfile->separate_debug_objfile != NULL
|
|
||||||
+ && SYMBOL_BFD_SECTION (msymbol)->owner
|
|
||||||
+ == objfile->separate_debug_objfile->obfd)
|
|
||||||
+ || (objfile->separate_debug_objfile_backlink != NULL
|
|
||||||
+ && SYMBOL_BFD_SECTION (msymbol)->owner
|
|
||||||
+ == objfile->separate_debug_objfile_backlink->obfd)))
|
|
||||||
+ {
|
|
||||||
+ if (!catch_errors (resolve_errno, (void *) &addr, "",
|
|
||||||
+ RETURN_MASK_ALL))
|
|
||||||
+ error (_("TLS symbol `errno' not resolved for non-TLS program."
|
|
||||||
+ " You should compile the program with `gcc -pthread'."));
|
|
||||||
+ }
|
|
||||||
+ else
|
|
||||||
+ error (_("Cannot find thread-local variables on this target"));
|
|
||||||
+ }
|
|
||||||
|
|
||||||
return addr;
|
|
||||||
}
|
|
||||||
--- ./gdb/elfread.c 2008-08-03 11:02:10.000000000 +0200
|
|
||||||
+++ ./gdb/elfread.c 2008-08-03 11:01:21.000000000 +0200
|
|
||||||
@@ -318,7 +318,8 @@ elf_symtab_read (struct objfile *objfile
|
|
||||||
/* Bfd symbols are section relative. */
|
|
||||||
symaddr = sym->value + sym->section->vma;
|
|
||||||
/* Relocate all non-absolute symbols by the section offset. */
|
|
||||||
- if (sym->section != &bfd_abs_section)
|
|
||||||
+ if (sym->section != &bfd_abs_section
|
|
||||||
+ && (sym->section->flags & SEC_THREAD_LOCAL) == 0)
|
|
||||||
{
|
|
||||||
symaddr += offset;
|
|
||||||
}
|
|
||||||
Index: gdb-6.8cvs20080219/gdb/testsuite/gdb.dwarf2/dw2-errno.c
|
|
||||||
===================================================================
|
|
||||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
|
||||||
+++ gdb-6.8cvs20080219/gdb/testsuite/gdb.dwarf2/dw2-errno.c 2008-02-20 13:35:19.000000000 +0100
|
|
||||||
@@ -0,0 +1,28 @@
|
@@ -0,0 +1,28 @@
|
||||||
+/* This testcase is part of GDB, the GNU debugger.
|
+/* This testcase is part of GDB, the GNU debugger.
|
||||||
+
|
+
|
||||||
|
@ -241,11 +88,11 @@ Index: gdb-6.8cvs20080219/gdb/testsuite/gdb.dwarf2/dw2-errno.c
|
||||||
+
|
+
|
||||||
+ return 0; /* breakpoint */
|
+ return 0; /* breakpoint */
|
||||||
+}
|
+}
|
||||||
Index: gdb-6.8cvs20080219/gdb/testsuite/gdb.dwarf2/dw2-errno.exp
|
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-errno.exp b/gdb/testsuite/gdb.dwarf2/dw2-errno.exp
|
||||||
===================================================================
|
new file mode 100644
|
||||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
--- /dev/null
|
||||||
+++ gdb-6.8cvs20080219/gdb/testsuite/gdb.dwarf2/dw2-errno.exp 2008-02-20 13:35:19.000000000 +0100
|
+++ b/gdb/testsuite/gdb.dwarf2/dw2-errno.exp
|
||||||
@@ -0,0 +1,67 @@
|
@@ -0,0 +1,60 @@
|
||||||
+# Copyright 2007 Free Software Foundation, Inc.
|
+# Copyright 2007 Free Software Foundation, Inc.
|
||||||
+
|
+
|
||||||
+# This program is free software; you can redistribute it and/or modify
|
+# This program is free software; you can redistribute it and/or modify
|
||||||
|
@ -261,16 +108,9 @@ Index: gdb-6.8cvs20080219/gdb/testsuite/gdb.dwarf2/dw2-errno.exp
|
||||||
+# You should have received a copy of the GNU General Public License
|
+# You should have received a copy of the GNU General Public License
|
||||||
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
+
|
+
|
||||||
+if $tracelevel then {
|
|
||||||
+ strace $tracelevel
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+set prms_id 0
|
|
||||||
+set bug_id 0
|
|
||||||
+
|
|
||||||
+set testfile dw2-errno
|
+set testfile dw2-errno
|
||||||
+set srcfile ${testfile}.c
|
+set srcfile ${testfile}.c
|
||||||
+set binfile ${objdir}/${subdir}/${testfile}
|
+set binfile [standard_output_file ${testfile}]
|
||||||
+
|
+
|
||||||
+proc prep {} {
|
+proc prep {} {
|
||||||
+ global srcdir subdir binfile
|
+ global srcdir subdir binfile
|
||||||
|
@ -313,3 +153,112 @@ Index: gdb-6.8cvs20080219/gdb/testsuite/gdb.dwarf2/dw2-errno.exp
|
||||||
+
|
+
|
||||||
+# TODO: Test the error on resolving ERRNO with only libc loaded.
|
+# TODO: Test the error on resolving ERRNO with only libc loaded.
|
||||||
+# Just how to find the current libc filename?
|
+# Just how to find the current libc filename?
|
||||||
|
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-errno2.c b/gdb/testsuite/gdb.dwarf2/dw2-errno2.c
|
||||||
|
new file mode 100644
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/gdb/testsuite/gdb.dwarf2/dw2-errno2.c
|
||||||
|
@@ -0,0 +1,28 @@
|
||||||
|
+/* This testcase is part of GDB, the GNU debugger.
|
||||||
|
+
|
||||||
|
+ Copyright 2005, 2007 Free Software Foundation, Inc.
|
||||||
|
+
|
||||||
|
+ This program is free software; you can redistribute it and/or modify
|
||||||
|
+ it under the terms of the GNU General Public License as published by
|
||||||
|
+ the Free Software Foundation; either version 3 of the License, or
|
||||||
|
+ (at your option) any later version.
|
||||||
|
+
|
||||||
|
+ This program is distributed in the hope that it will be useful,
|
||||||
|
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
+ GNU General Public License for more details.
|
||||||
|
+
|
||||||
|
+ You should have received a copy of the GNU General Public License
|
||||||
|
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
+
|
||||||
|
+ Please email any bugs, comments, and/or additions to this file to:
|
||||||
|
+ bug-gdb@prep.ai.mit.edu */
|
||||||
|
+
|
||||||
|
+#include <errno.h>
|
||||||
|
+
|
||||||
|
+int main()
|
||||||
|
+{
|
||||||
|
+ errno = 42;
|
||||||
|
+
|
||||||
|
+ return 0; /* breakpoint */
|
||||||
|
+}
|
||||||
|
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-errno2.exp b/gdb/testsuite/gdb.dwarf2/dw2-errno2.exp
|
||||||
|
new file mode 100644
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/gdb/testsuite/gdb.dwarf2/dw2-errno2.exp
|
||||||
|
@@ -0,0 +1,71 @@
|
||||||
|
+# Copyright 2007 Free Software Foundation, Inc.
|
||||||
|
+
|
||||||
|
+# This program is free software; you can redistribute it and/or modify
|
||||||
|
+# it under the terms of the GNU General Public License as published by
|
||||||
|
+# the Free Software Foundation; either version 3 of the License, or
|
||||||
|
+# (at your option) any later version.
|
||||||
|
+#
|
||||||
|
+# This program is distributed in the hope that it will be useful,
|
||||||
|
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
+# GNU General Public License for more details.
|
||||||
|
+#
|
||||||
|
+# You should have received a copy of the GNU General Public License
|
||||||
|
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
+
|
||||||
|
+set testfile dw2-errno2
|
||||||
|
+set srcfile ${testfile}.c
|
||||||
|
+set binfile [standard_output_file ${testfile}]
|
||||||
|
+
|
||||||
|
+proc prep { message {do_xfail 0} } { with_test_prefix $message {
|
||||||
|
+ global srcdir subdir binfile variant
|
||||||
|
+ gdb_exit
|
||||||
|
+ gdb_start
|
||||||
|
+ gdb_reinitialize_dir $srcdir/$subdir
|
||||||
|
+ gdb_load ${binfile}${variant}
|
||||||
|
+
|
||||||
|
+ runto_main
|
||||||
|
+
|
||||||
|
+ gdb_breakpoint [gdb_get_line_number "breakpoint"]
|
||||||
|
+ gdb_continue_to_breakpoint "breakpoint"
|
||||||
|
+
|
||||||
|
+ gdb_test "gcore ${binfile}${variant}.core" "\r\nSaved corefile .*" "gcore $variant"
|
||||||
|
+
|
||||||
|
+ gdb_test "print errno" ".* = 42"
|
||||||
|
+
|
||||||
|
+ gdb_test "kill" ".*" "kill" {Kill the program being debugged\? \(y or n\) } "y"
|
||||||
|
+ gdb_test "core-file ${binfile}${variant}.core" "\r\nCore was generated by .*" "core-file"
|
||||||
|
+ if $do_xfail {
|
||||||
|
+ setup_xfail "*-*-*"
|
||||||
|
+ }
|
||||||
|
+ gdb_test "print (int) errno" ".* = 42" "print errno for core"
|
||||||
|
+}}
|
||||||
|
+
|
||||||
|
+set variant g2thrN
|
||||||
|
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}${variant}" executable "additional_flags=-g2"] != "" } {
|
||||||
|
+ untested "Couldn't compile test program"
|
||||||
|
+ return -1
|
||||||
|
+}
|
||||||
|
+prep "macros=N threads=N" 1
|
||||||
|
+
|
||||||
|
+set variant g3thrN
|
||||||
|
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}${variant}" executable "additional_flags=-g3"] != "" } {
|
||||||
|
+ untested "Couldn't compile test program"
|
||||||
|
+ return -1
|
||||||
|
+}
|
||||||
|
+prep "macros=Y threads=N" 1
|
||||||
|
+
|
||||||
|
+set variant g2thrY
|
||||||
|
+if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}${variant}" executable "additional_flags=-g2"] != "" } {
|
||||||
|
+ return -1
|
||||||
|
+}
|
||||||
|
+prep "macros=N threads=Y"
|
||||||
|
+
|
||||||
|
+set variant g3thrY
|
||||||
|
+if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}${variant}" executable "additional_flags=-g3"] != "" } {
|
||||||
|
+ return -1
|
||||||
|
+}
|
||||||
|
+prep "macros=Y threads=Y" 1
|
||||||
|
+
|
||||||
|
+# TODO: Test the error on resolving ERRNO with only libc loaded.
|
||||||
|
+# Just how to find the current libc filename?
|
||||||
|
|
|
@ -1,43 +0,0 @@
|
||||||
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=190810
|
|
||||||
|
|
||||||
|
|
||||||
2006-09-26 Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
||||||
|
|
||||||
* remote.c (remote_wait): Suggestion on crash due to nonmatching target.
|
|
||||||
(remote_async_wait): Likewise.
|
|
||||||
|
|
||||||
|
|
||||||
Index: gdb-6.8/gdb/remote.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.8.orig/gdb/remote.c 2008-07-14 10:27:07.000000000 +0200
|
|
||||||
+++ gdb-6.8/gdb/remote.c 2008-07-14 10:27:17.000000000 +0200
|
|
||||||
@@ -3509,8 +3509,13 @@ Packet: '%s'\n"),
|
|
||||||
reg->regnum, regs);
|
|
||||||
}
|
|
||||||
|
|
||||||
+ /* It may also occur on amd64 which defaults to 32-bit i386
|
|
||||||
+ target. gdbserver(1) is not aware of the `set architecture'
|
|
||||||
+ name itself as it is not using libbfd. */
|
|
||||||
if (*p++ != ';')
|
|
||||||
- error (_("Remote register badly formatted: %s\nhere: %s"),
|
|
||||||
+ error (_("Remote register badly formatted: %s\nhere: %s"
|
|
||||||
+ "\nTry to load the executable by `file' first,"
|
|
||||||
+ "\nyou may also check `set/show architecture'."),
|
|
||||||
buf, p);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -3737,8 +3742,13 @@ Packet: '%s'\n"),
|
|
||||||
reg->regnum, regs);
|
|
||||||
}
|
|
||||||
|
|
||||||
+ /* It may also occur on amd64 which defaults to 32-bit i386
|
|
||||||
+ target. gdbserver(1) is not aware of the `set architecture'
|
|
||||||
+ name itself as it is not using libbfd. */
|
|
||||||
if (*p++ != ';')
|
|
||||||
- error (_("Remote register badly formatted: %s\nhere: %s"),
|
|
||||||
+ error (_("Remote register badly formatted: %s\nhere: %s"
|
|
||||||
+ "\nTry to load the executable by `file' first,"
|
|
||||||
+ "\nyou may also check `set/show architecture'."),
|
|
||||||
buf, p);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,17 +0,0 @@
|
||||||
Index: gdb-6.5/gdb/symfile.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.5.orig/gdb/symfile.c 2006-08-24 02:56:02.000000000 -0300
|
|
||||||
+++ gdb-6.5/gdb/symfile.c 2006-08-24 02:56:36.000000000 -0300
|
|
||||||
@@ -3739,6 +3739,12 @@ symfile_dummy_outputs (bfd *abfd, asecti
|
|
||||||
bfd_byte *
|
|
||||||
symfile_relocate_debug_section (bfd *abfd, asection *sectp, bfd_byte *buf)
|
|
||||||
{
|
|
||||||
+ /* Executable files have all the relocations already resolved.
|
|
||||||
+ * Handle files linked with --emit-relocs.
|
|
||||||
+ * http://sources.redhat.com/ml/gdb/2006-08/msg00137.html */
|
|
||||||
+ if ((abfd->flags & EXEC_P) != 0)
|
|
||||||
+ return NULL;
|
|
||||||
+
|
|
||||||
/* We're only interested in debugging sections with relocation
|
|
||||||
information. */
|
|
||||||
if ((sectp->flags & SEC_RELOC) == 0)
|
|
|
@ -1,275 +0,0 @@
|
||||||
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=216711
|
|
||||||
|
|
||||||
|
|
||||||
2006-12-17 Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
||||||
|
|
||||||
* gdb/amd64-linux-tdep.c (linux_clone_code): New variable.
|
|
||||||
(LINUX_CLONE_LEN): New definition.
|
|
||||||
(amd64_linux_clone_running, amd64_linux_outermost_frame): New function.
|
|
||||||
(amd64_linux_init_abi): Initialize `outermost_frame_p'.
|
|
||||||
* gdb/i386-tdep.c (i386_gdbarch_init): Likewise.
|
|
||||||
* gdb/i386-tdep.h (gdbarch_tdep): Add `outermost_frame_p' member.
|
|
||||||
* gdb/amd64-tdep.c (amd64_frame_this_id): Call `outermost_frame_p'.
|
|
||||||
|
|
||||||
2006-12-17 Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
||||||
|
|
||||||
* gdb.threads/bt-clone-stop.exp, gdb.threads/bt-clone-stop.c:
|
|
||||||
New file.
|
|
||||||
|
|
||||||
2007-10-16 Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
||||||
|
|
||||||
Port to GDB-6.7.
|
|
||||||
|
|
||||||
Index: gdb-6.7/gdb/amd64-linux-tdep.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.7.orig/gdb/amd64-linux-tdep.c 2007-08-23 20:08:26.000000000 +0200
|
|
||||||
+++ gdb-6.7/gdb/amd64-linux-tdep.c 2007-10-16 15:57:03.000000000 +0200
|
|
||||||
@@ -234,6 +234,80 @@ amd64_linux_register_reggroup_p (struct
|
|
||||||
|
|
||||||
/* Set the program counter for process PTID to PC. */
|
|
||||||
|
|
||||||
+/* Detect the outermost frame; during unwind of
|
|
||||||
+ #5 0x000000305cec68c3 in clone () from /lib64/tls/libc.so.6
|
|
||||||
+ avoid the additional bogus frame
|
|
||||||
+ #6 0x0000000000000000 in ??
|
|
||||||
+ We compare if the `linux_clone_code' block is _before_ unwound PC. */
|
|
||||||
+
|
|
||||||
+static const unsigned char linux_clone_code[] =
|
|
||||||
+{
|
|
||||||
+/* libc/sysdeps/unix/sysv/linux/x86_64/clone.S */
|
|
||||||
+/* #ifdef RESET_PID */
|
|
||||||
+/* ... */
|
|
||||||
+/* mov $SYS_ify(getpid), %eax */
|
|
||||||
+/* 0xb8, 0x27, 0x00, 0x00, 0x00 */
|
|
||||||
+/* OR */
|
|
||||||
+/* mov $SYS_ify(getpid), %rax */
|
|
||||||
+/* 0x48, 0xc7, 0xc0, 0x27, 0x00, 0x00, 0x00 */
|
|
||||||
+/* so just: */
|
|
||||||
+ 0x27, 0x00, 0x00, 0x00,
|
|
||||||
+/* syscall */
|
|
||||||
+ 0x0f, 0x05,
|
|
||||||
+/* movl %eax, %fs:PID */
|
|
||||||
+ 0x64, 0x89, 0x04, 0x25, 0x94, 0x00, 0x00, 0x00,
|
|
||||||
+/* movl %eax, %fs:TID */
|
|
||||||
+ 0x64, 0x89, 0x04, 0x25, 0x90, 0x00, 0x00, 0x00,
|
|
||||||
+/* #endif */
|
|
||||||
+/* |* Set up arguments for the function call. *| */
|
|
||||||
+/* popq %rax |* Function to call. *| */
|
|
||||||
+ 0x58,
|
|
||||||
+/* popq %rdi |* Argument. *| */
|
|
||||||
+ 0x5f,
|
|
||||||
+/* call *%rax$ */
|
|
||||||
+ 0xff, 0xd0
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+#define LINUX_CLONE_LEN (sizeof linux_clone_code)
|
|
||||||
+
|
|
||||||
+static int
|
|
||||||
+amd64_linux_clone_running (struct frame_info *next_frame)
|
|
||||||
+{
|
|
||||||
+ CORE_ADDR pc = frame_pc_unwind (next_frame);
|
|
||||||
+ unsigned char buf[LINUX_CLONE_LEN];
|
|
||||||
+
|
|
||||||
+ if (!safe_frame_unwind_memory (next_frame, pc - LINUX_CLONE_LEN, buf,
|
|
||||||
+ LINUX_CLONE_LEN))
|
|
||||||
+ return 0;
|
|
||||||
+
|
|
||||||
+ if (memcmp (buf, linux_clone_code, LINUX_CLONE_LEN) != 0)
|
|
||||||
+ return 0;
|
|
||||||
+
|
|
||||||
+ return 1;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static int
|
|
||||||
+amd64_linux_outermost_frame (struct frame_info *next_frame)
|
|
||||||
+{
|
|
||||||
+ CORE_ADDR pc = frame_pc_unwind (next_frame);
|
|
||||||
+ char *name;
|
|
||||||
+
|
|
||||||
+ find_pc_partial_function (pc, &name, NULL, NULL);
|
|
||||||
+
|
|
||||||
+ /* If we have NAME, we can optimize the search.
|
|
||||||
+ `clone' NAME still needs to have the code checked as its name may be
|
|
||||||
+ present in the user code.
|
|
||||||
+ `__clone' NAME should not be present in the user code but in the initial
|
|
||||||
+ parts of the `__clone' implementation the unwind still makes sense.
|
|
||||||
+ More detailed unwinding decision would be too much sensitive to possible
|
|
||||||
+ subtle changes in specific glibc revisions. */
|
|
||||||
+ if (name == NULL || strcmp (name, "clone") == 0
|
|
||||||
+ || strcmp ("__clone", name) == 0)
|
|
||||||
+ return (amd64_linux_clone_running (next_frame) != 0);
|
|
||||||
+
|
|
||||||
+ return 0;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
static void
|
|
||||||
amd64_linux_write_pc (struct regcache *regcache, CORE_ADDR pc)
|
|
||||||
{
|
|
||||||
@@ -272,6 +346,8 @@ amd64_linux_init_abi (struct gdbarch_inf
|
|
||||||
tdep->sc_reg_offset = amd64_linux_sc_reg_offset;
|
|
||||||
tdep->sc_num_regs = ARRAY_SIZE (amd64_linux_sc_reg_offset);
|
|
||||||
|
|
||||||
+ tdep->outermost_frame_p = amd64_linux_outermost_frame;
|
|
||||||
+
|
|
||||||
/* GNU/Linux uses SVR4-style shared libraries. */
|
|
||||||
set_solib_svr4_fetch_link_map_offsets
|
|
||||||
(gdbarch, svr4_lp64_fetch_link_map_offsets);
|
|
||||||
Index: gdb-6.7/gdb/amd64-tdep.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.7.orig/gdb/amd64-tdep.c 2007-10-12 17:48:39.000000000 +0200
|
|
||||||
+++ gdb-6.7/gdb/amd64-tdep.c 2007-10-16 15:57:03.000000000 +0200
|
|
||||||
@@ -849,11 +849,16 @@ amd64_frame_this_id (struct frame_info *
|
|
||||||
{
|
|
||||||
struct amd64_frame_cache *cache =
|
|
||||||
amd64_frame_cache (next_frame, this_cache);
|
|
||||||
+ struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
|
|
||||||
|
|
||||||
/* This marks the outermost frame. */
|
|
||||||
if (cache->base == 0)
|
|
||||||
return;
|
|
||||||
|
|
||||||
+ /* Detect OS dependent outermost frames; such as `clone'. */
|
|
||||||
+ if (tdep->outermost_frame_p && tdep->outermost_frame_p (next_frame))
|
|
||||||
+ return;
|
|
||||||
+
|
|
||||||
(*this_id) = frame_id_build (cache->base + 16, cache->pc);
|
|
||||||
}
|
|
||||||
|
|
||||||
Index: gdb-6.7/gdb/i386-tdep.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.7.orig/gdb/i386-tdep.c 2007-10-12 17:48:39.000000000 +0200
|
|
||||||
+++ gdb-6.7/gdb/i386-tdep.c 2007-10-16 15:57:03.000000000 +0200
|
|
||||||
@@ -2355,6 +2355,9 @@ i386_gdbarch_init (struct gdbarch_info i
|
|
||||||
tdep->sc_pc_offset = -1;
|
|
||||||
tdep->sc_sp_offset = -1;
|
|
||||||
|
|
||||||
+ /* Unwinding stops on i386 automatically. */
|
|
||||||
+ tdep->outermost_frame_p = NULL;
|
|
||||||
+
|
|
||||||
/* The format used for `long double' on almost all i386 targets is
|
|
||||||
the i387 extended floating-point format. In fact, of all targets
|
|
||||||
in the GCC 2.95 tree, only OSF/1 does it different, and insists
|
|
||||||
Index: gdb-6.7/gdb/i386-tdep.h
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.7.orig/gdb/i386-tdep.h 2007-08-23 20:08:34.000000000 +0200
|
|
||||||
+++ gdb-6.7/gdb/i386-tdep.h 2007-10-16 15:57:32.000000000 +0200
|
|
||||||
@@ -106,6 +106,9 @@ struct gdbarch_tdep
|
|
||||||
/* ISA-specific data types. */
|
|
||||||
struct type *i386_mmx_type;
|
|
||||||
struct type *i386_sse_type;
|
|
||||||
+
|
|
||||||
+ /* Detect OS dependent outermost frames; such as `clone'. */
|
|
||||||
+ int (*outermost_frame_p) (struct frame_info *next_frame);
|
|
||||||
};
|
|
||||||
|
|
||||||
/* Floating-point registers. */
|
|
||||||
Index: gdb-6.7/gdb/testsuite/gdb.threads/bt-clone-stop.c
|
|
||||||
===================================================================
|
|
||||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
|
||||||
+++ gdb-6.7/gdb/testsuite/gdb.threads/bt-clone-stop.c 2007-10-16 15:57:03.000000000 +0200
|
|
||||||
@@ -0,0 +1,39 @@
|
|
||||||
+/* This testcase is part of GDB, the GNU debugger.
|
|
||||||
+
|
|
||||||
+ Copyright 2006 Free Software Foundation, Inc.
|
|
||||||
+
|
|
||||||
+ This program is free software; you can redistribute it and/or modify
|
|
||||||
+ it under the terms of the GNU General Public License as published by
|
|
||||||
+ the Free Software Foundation; either version 2 of the License, or
|
|
||||||
+ (at your option) any later version.
|
|
||||||
+
|
|
||||||
+ This program is distributed in the hope that it will be useful,
|
|
||||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
+ GNU General Public License for more details.
|
|
||||||
+
|
|
||||||
+ You should have received a copy of the GNU General Public License
|
|
||||||
+ along with this program; if not, write to the Free Software
|
|
||||||
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
|
||||||
+ MA 02110-1301, USA. */
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+#include <pthread.h>
|
|
||||||
+#include <unistd.h>
|
|
||||||
+#include <assert.h>
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+void *threader (void *arg)
|
|
||||||
+{
|
|
||||||
+ assert (0);
|
|
||||||
+ return NULL;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+int main (void)
|
|
||||||
+{
|
|
||||||
+ pthread_t t1;
|
|
||||||
+
|
|
||||||
+ pthread_create (&t1, NULL, threader, (void *) NULL);
|
|
||||||
+ for (;;)
|
|
||||||
+ pause();
|
|
||||||
+}
|
|
||||||
Index: gdb-6.7/gdb/testsuite/gdb.threads/bt-clone-stop.exp
|
|
||||||
===================================================================
|
|
||||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
|
||||||
+++ gdb-6.7/gdb/testsuite/gdb.threads/bt-clone-stop.exp 2007-10-16 15:57:03.000000000 +0200
|
|
||||||
@@ -0,0 +1,61 @@
|
|
||||||
+# Copyright 2006 Free Software Foundation, Inc.
|
|
||||||
+
|
|
||||||
+# This program is free software; you can redistribute it and/or modify
|
|
||||||
+# it under the terms of the GNU General Public License as published by
|
|
||||||
+# the Free Software Foundation; either version 2 of the License, or
|
|
||||||
+# (at your option) any later version.
|
|
||||||
+#
|
|
||||||
+# This program is distributed in the hope that it will be useful,
|
|
||||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
+# GNU General Public License for more details.
|
|
||||||
+#
|
|
||||||
+# You should have received a copy of the GNU General Public License
|
|
||||||
+# along with this program; if not, write to the Free Software
|
|
||||||
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
+
|
|
||||||
+# Backtraced `clone' must not have `PC == 0' as its previous frame.
|
|
||||||
+
|
|
||||||
+if $tracelevel then {
|
|
||||||
+ strace $tracelevel
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+set testfile bt-clone-stop
|
|
||||||
+set srcfile ${testfile}.c
|
|
||||||
+set binfile ${objdir}/${subdir}/${testfile}
|
|
||||||
+if { [gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
|
|
||||||
+ untested "Couldn't compile test program"
|
|
||||||
+ return -1
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+# Get things started.
|
|
||||||
+
|
|
||||||
+gdb_exit
|
|
||||||
+gdb_start
|
|
||||||
+gdb_reinitialize_dir $srcdir/$subdir
|
|
||||||
+gdb_load ${binfile}
|
|
||||||
+
|
|
||||||
+# threader: threader.c:8: threader: Assertion `0' failed.
|
|
||||||
+# Program received signal SIGABRT, Aborted.
|
|
||||||
+
|
|
||||||
+gdb_test "run" \
|
|
||||||
+ "Program received signal SIGABRT.*" \
|
|
||||||
+ "run"
|
|
||||||
+
|
|
||||||
+# Former gdb unwind (the first function is `clone'):
|
|
||||||
+# #5 0x0000003421ecd62d in ?? () from /lib64/libc.so.6
|
|
||||||
+# #6 0x0000000000000000 in ?? ()
|
|
||||||
+# (gdb)
|
|
||||||
+# Tested `amd64_linux_outermost_frame' functionality should omit the line `#6'.
|
|
||||||
+#
|
|
||||||
+# Two `-re' cases below must be in this order (1st is a subset of the 2nd one).
|
|
||||||
+# Unhandled case below should not happen and it is fortunately handled by
|
|
||||||
+# `amd64_linux_outermost_frame' as FAIL (and result `0x0 entry output invalid').
|
|
||||||
+gdb_test_multiple "bt" "0x0 entry output invalid" {
|
|
||||||
+ -re "in threader \\(.*\n#\[0-9\]* *0x0* in .*$gdb_prompt $" {
|
|
||||||
+ fail "0x0 entry found"
|
|
||||||
+ }
|
|
||||||
+ -re "in threader \\(.*$gdb_prompt $" {
|
|
||||||
+ pass "0x0 entry not found"
|
|
||||||
+ }
|
|
||||||
+}
|
|
|
@ -1,19 +0,0 @@
|
||||||
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=218379
|
|
||||||
|
|
||||||
|
|
||||||
Index: gdb-6.6/gdb/minsyms.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.6.orig/gdb/minsyms.c 2007-01-20 13:53:48.000000000 +0100
|
|
||||||
+++ gdb-6.6/gdb/minsyms.c 2007-01-20 13:58:47.000000000 +0100
|
|
||||||
@@ -490,6 +490,11 @@ lookup_minimal_symbol_by_pc_section (COR
|
|
||||||
don't fill the bfd_section member, so don't
|
|
||||||
throw away symbols on those platforms. */
|
|
||||||
&& SYMBOL_BFD_SECTION (&msymbol[hi]) != NULL
|
|
||||||
+ /* Don't ignore symbols for solib trampolines.
|
|
||||||
+ Limit its sideeffects - only for non-0 sized trampolines.
|
|
||||||
+ Red Hat Bug 200533 with its regression Bug 218379. */
|
|
||||||
+ && (MSYMBOL_TYPE (&msymbol[hi]) != mst_solib_trampoline
|
|
||||||
+ || MSYMBOL_SIZE (&msymbol[hi]))
|
|
||||||
&& (!matching_bfd_sections
|
|
||||||
(SYMBOL_BFD_SECTION (&msymbol[hi]), section)))
|
|
||||||
{
|
|
|
@ -1,8 +1,50 @@
|
||||||
|
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||||
|
From: Fedora GDB patches <invalid@email.com>
|
||||||
|
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||||
|
Subject: gdb-6.5-bz218379-ppc-solib-trampoline-test.patch
|
||||||
|
|
||||||
|
;; Test sideeffects of skipping ppc .so libs trampolines (BZ 218379).
|
||||||
|
;;=fedoratest
|
||||||
|
|
||||||
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=218379
|
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=218379
|
||||||
|
|
||||||
|
diff --git a/gdb/testsuite/gdb.base/step-over-trampoline.c b/gdb/testsuite/gdb.base/step-over-trampoline.c
|
||||||
--- /dev/null 2006-12-17 14:18:21.881669220 -0500
|
new file mode 100644
|
||||||
+++ gdb-6.5/gdb/testsuite/gdb.base/step-over-trampoline.exp 2006-12-17 16:52:51.000000000 -0500
|
--- /dev/null
|
||||||
|
+++ b/gdb/testsuite/gdb.base/step-over-trampoline.c
|
||||||
|
@@ -0,0 +1,28 @@
|
||||||
|
+/* This testcase is part of GDB, the GNU debugger.
|
||||||
|
+
|
||||||
|
+ Copyright 2006 Free Software Foundation, Inc.
|
||||||
|
+
|
||||||
|
+ This program is free software; you can redistribute it and/or modify
|
||||||
|
+ it under the terms of the GNU General Public License as published by
|
||||||
|
+ the Free Software Foundation; either version 2 of the License, or
|
||||||
|
+ (at your option) any later version.
|
||||||
|
+
|
||||||
|
+ This program is distributed in the hope that it will be useful,
|
||||||
|
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
+ GNU General Public License for more details.
|
||||||
|
+
|
||||||
|
+ You should have received a copy of the GNU General Public License
|
||||||
|
+ along with this program; if not, write to the Free Software
|
||||||
|
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
+
|
||||||
|
+ Please email any bugs, comments, and/or additions to this file to:
|
||||||
|
+ bug-gdb@prep.ai.mit.edu */
|
||||||
|
+
|
||||||
|
+#include <stdio.h>
|
||||||
|
+
|
||||||
|
+int main (void)
|
||||||
|
+{
|
||||||
|
+ puts ("hello world");
|
||||||
|
+ return 0;
|
||||||
|
+}
|
||||||
|
diff --git a/gdb/testsuite/gdb.base/step-over-trampoline.exp b/gdb/testsuite/gdb.base/step-over-trampoline.exp
|
||||||
|
new file mode 100644
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/gdb/testsuite/gdb.base/step-over-trampoline.exp
|
||||||
@@ -0,0 +1,54 @@
|
@@ -0,0 +1,54 @@
|
||||||
+# Copyright 2006 Free Software Foundation, Inc.
|
+# Copyright 2006 Free Software Foundation, Inc.
|
||||||
+
|
+
|
||||||
|
@ -26,7 +68,7 @@ https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=218379
|
||||||
+
|
+
|
||||||
+set testfile step-over-trampoline
|
+set testfile step-over-trampoline
|
||||||
+set srcfile ${testfile}.c
|
+set srcfile ${testfile}.c
|
||||||
+set binfile ${objdir}/${subdir}/${testfile}
|
+set binfile [standard_output_file ${testfile}]
|
||||||
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
|
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
|
||||||
+ untested "Couldn't compile test program"
|
+ untested "Couldn't compile test program"
|
||||||
+ return -1
|
+ return -1
|
||||||
|
@ -58,34 +100,3 @@ https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=218379
|
||||||
+ fail "stepped into trampoline"
|
+ fail "stepped into trampoline"
|
||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
--- /dev/null 2006-12-17 14:18:21.881669220 -0500
|
|
||||||
+++ gdb-6.5/gdb/testsuite/gdb.base/step-over-trampoline.c 2006-12-17 16:18:12.000000000 -0500
|
|
||||||
@@ -0,0 +1,28 @@
|
|
||||||
+/* This testcase is part of GDB, the GNU debugger.
|
|
||||||
+
|
|
||||||
+ Copyright 2006 Free Software Foundation, Inc.
|
|
||||||
+
|
|
||||||
+ This program is free software; you can redistribute it and/or modify
|
|
||||||
+ it under the terms of the GNU General Public License as published by
|
|
||||||
+ the Free Software Foundation; either version 2 of the License, or
|
|
||||||
+ (at your option) any later version.
|
|
||||||
+
|
|
||||||
+ This program is distributed in the hope that it will be useful,
|
|
||||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
+ GNU General Public License for more details.
|
|
||||||
+
|
|
||||||
+ You should have received a copy of the GNU General Public License
|
|
||||||
+ along with this program; if not, write to the Free Software
|
|
||||||
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
+
|
|
||||||
+ Please email any bugs, comments, and/or additions to this file to:
|
|
||||||
+ bug-gdb@prep.ai.mit.edu */
|
|
||||||
+
|
|
||||||
+#include <stdio.h>
|
|
||||||
+
|
|
||||||
+int main (void)
|
|
||||||
+{
|
|
||||||
+ puts ("hello world");
|
|
||||||
+ return 0;
|
|
||||||
+}
|
|
||||||
|
|
|
@ -1,21 +1,27 @@
|
||||||
|
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||||
|
From: Fedora GDB patches <invalid@email.com>
|
||||||
|
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||||
|
Subject: gdb-6.5-bz218379-solib-trampoline-lookup-lock-fix.patch
|
||||||
|
|
||||||
|
;; Fix lockup on trampoline vs. its function lookup; unreproducible (BZ 218379).
|
||||||
|
;;=fedora
|
||||||
|
|
||||||
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=218379
|
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=218379
|
||||||
|
|
||||||
|
diff --git a/gdb/symtab.c b/gdb/symtab.c
|
||||||
Index: gdb-6.8/gdb/symtab.c
|
--- a/gdb/symtab.c
|
||||||
===================================================================
|
+++ b/gdb/symtab.c
|
||||||
--- gdb-6.8.orig/gdb/symtab.c 2008-02-05 23:17:40.000000000 +0100
|
@@ -3169,6 +3169,13 @@ find_pc_sect_line (CORE_ADDR pc, struct obj_section *section, int notcurrent)
|
||||||
+++ gdb-6.8/gdb/symtab.c 2008-07-14 10:27:32.000000000 +0200
|
msymbol->linkage_name ()); */
|
||||||
@@ -2132,6 +2132,13 @@ find_pc_sect_line (CORE_ADDR pc, struct
|
;
|
||||||
/* See above comment about why warning is commented out */
|
|
||||||
/* warning ("In stub for %s; unable to find real function/line info", SYMBOL_LINKAGE_NAME (msymbol)) */ ;
|
|
||||||
/* fall through */
|
/* fall through */
|
||||||
+ /* `msymbol' trampoline may be located before its .text symbol
|
+ /* `msymbol' trampoline may be located before its .text symbol
|
||||||
+ but this text symbol may be the address we were looking for.
|
+ but this text symbol may be the address we were looking for.
|
||||||
+ Avoid `find_pc_sect_line'<->`find_pc_line' infinite loop.
|
+ Avoid `find_pc_sect_line'<->`find_pc_line' infinite loop.
|
||||||
+ Red Hat Bug 218379. */
|
+ Red Hat Bug 218379. */
|
||||||
+ else if (SYMBOL_VALUE (mfunsym) == pc)
|
+ else if (BMSYMBOL_VALUE_ADDRESS (mfunsym) == pc)
|
||||||
+ warning ("In stub for %s (0x%s); interlocked, please submit the binary to http://bugzilla.redhat.com", SYMBOL_LINKAGE_NAME (msymbol), paddr (pc));
|
+ warning ("In stub for %s (0x%s); interlocked, please submit the binary to http://bugzilla.redhat.com", msymbol.minsym->linkage_name (), paddress (target_gdbarch (), pc));
|
||||||
+ /* fall through */
|
+ /* fall through */
|
||||||
else
|
else
|
||||||
return find_pc_line (SYMBOL_VALUE_ADDRESS (mfunsym), 0);
|
{
|
||||||
}
|
/* Detect an obvious case of infinite recursion. If this
|
||||||
|
|
|
@ -1,7 +1,16 @@
|
||||||
diff -u -ruNp gdb-6.3-unpatched/gdb/testsuite/gdb.base/tracefork-zombie.exp gdb-6.3/gdb/testsuite/gdb.base/tracefork-zombie.exp
|
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||||
--- gdb-6.3-unpatched/gdb/testsuite/gdb.base/tracefork-zombie.exp 1969-12-31 19:00:00.000000000 -0500
|
From: Fedora GDB patches <invalid@email.com>
|
||||||
+++ gdb-6.3/gdb/testsuite/gdb.base/tracefork-zombie.exp 2007-07-31 13:04:12.000000000 -0400
|
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||||
@@ -0,0 +1,82 @@
|
Subject: gdb-6.5-bz243845-stale-testing-zombie-test.patch
|
||||||
|
|
||||||
|
;; Test leftover zombie process (BZ 243845).
|
||||||
|
;;=fedoratest
|
||||||
|
|
||||||
|
diff --git a/gdb/testsuite/gdb.base/tracefork-zombie.exp b/gdb/testsuite/gdb.base/tracefork-zombie.exp
|
||||||
|
new file mode 100644
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/gdb/testsuite/gdb.base/tracefork-zombie.exp
|
||||||
|
@@ -0,0 +1,75 @@
|
||||||
+# Copyright 2007 Free Software Foundation, Inc.
|
+# Copyright 2007 Free Software Foundation, Inc.
|
||||||
+
|
+
|
||||||
+# This program is free software; you can redistribute it and/or modify
|
+# This program is free software; you can redistribute it and/or modify
|
||||||
|
@ -18,13 +27,6 @@ diff -u -ruNp gdb-6.3-unpatched/gdb/testsuite/gdb.base/tracefork-zombie.exp gdb-
|
||||||
+# along with this program; if not, write to the Free Software
|
+# along with this program; if not, write to the Free Software
|
||||||
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||||
+
|
+
|
||||||
+if $tracelevel then {
|
|
||||||
+ strace $tracelevel
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+set prms_id 0
|
|
||||||
+set bug_id 0
|
|
||||||
+
|
|
||||||
+# are we on a target board
|
+# are we on a target board
|
||||||
+if [is_remote target] then {
|
+if [is_remote target] then {
|
||||||
+ return 0
|
+ return 0
|
||||||
|
|
|
@ -1,52 +0,0 @@
|
||||||
for gdb/ChangeLog:
|
|
||||||
2006-08-22 Will Drewry <wad@google.com>
|
|
||||||
Tavis Ormandy <taviso@google.com>
|
|
||||||
|
|
||||||
* dwarf2read.c (decode_locdesc): Enforce location description stack
|
|
||||||
boundaries.
|
|
||||||
* dwarfread.c (locval): Likewise.
|
|
||||||
|
|
||||||
2007-10-15 Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
||||||
|
|
||||||
Port to GDB-6.7.
|
|
||||||
|
|
||||||
Index: gdb-6.7/gdb/dwarf2read.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.7.orig/gdb/dwarf2read.c 2007-10-15 00:08:30.000000000 +0200
|
|
||||||
+++ gdb-6.7/gdb/dwarf2read.c 2007-10-15 21:42:43.000000000 +0200
|
|
||||||
@@ -9070,8 +9070,7 @@ dwarf2_fundamental_type (struct objfile
|
|
||||||
callers will only want a very basic result and this can become a
|
|
||||||
complaint.
|
|
||||||
|
|
||||||
- Note that stack[0] is unused except as a default error return.
|
|
||||||
- Note that stack overflow is not yet handled. */
|
|
||||||
+ Note that stack[0] is unused except as a default error return. */
|
|
||||||
|
|
||||||
static CORE_ADDR
|
|
||||||
decode_locdesc (struct dwarf_block *blk, struct dwarf2_cu *cu)
|
|
||||||
@@ -9088,7 +9087,7 @@ decode_locdesc (struct dwarf_block *blk,
|
|
||||||
|
|
||||||
i = 0;
|
|
||||||
stacki = 0;
|
|
||||||
- stack[stacki] = 0;
|
|
||||||
+ stack[++stacki] = 0;
|
|
||||||
|
|
||||||
while (i < size)
|
|
||||||
{
|
|
||||||
@@ -9270,6 +9269,16 @@ decode_locdesc (struct dwarf_block *blk,
|
|
||||||
dwarf_stack_op_name (op));
|
|
||||||
return (stack[stacki]);
|
|
||||||
}
|
|
||||||
+ /* Enforce maximum stack depth of size-1 to avoid ++stacki writing
|
|
||||||
+ outside of the allocated space. Also enforce minimum > 0.
|
|
||||||
+ -- wad@google.com 14 Aug 2006 */
|
|
||||||
+ if (stacki >= sizeof (stack) / sizeof (*stack) - 1)
|
|
||||||
+ internal_error (__FILE__, __LINE__,
|
|
||||||
+ _("location description stack too deep: %d"),
|
|
||||||
+ stacki);
|
|
||||||
+ if (stacki <= 0)
|
|
||||||
+ internal_error (__FILE__, __LINE__,
|
|
||||||
+ _("location description stack too shallow"));
|
|
||||||
}
|
|
||||||
return (stack[stacki]);
|
|
||||||
}
|
|
|
@ -1,6 +1,15 @@
|
||||||
diff -u -X /home/jkratoch/.diffi.list -ruNp gdb-6.5/gdb/testsuite/gdb.base/gcore-excessive-memory.c gdb-6.5-unknown/gdb/testsuite/gdb.base/gcore-excessive-memory.c
|
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||||
--- gdb-6.5/gdb/testsuite/gdb.base/gcore-excessive-memory.c 1970-01-01 01:00:00.000000000 +0100
|
From: Fedora GDB patches <invalid@email.com>
|
||||||
+++ gdb-6.5-unknown/gdb/testsuite/gdb.base/gcore-excessive-memory.c 2008-01-08 11:25:45.000000000 +0100
|
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||||
|
Subject: gdb-6.5-gcore-buffer-limit-test.patch
|
||||||
|
|
||||||
|
;; Test gcore memory and time requirements for large inferiors.
|
||||||
|
;;=fedoratest
|
||||||
|
|
||||||
|
diff --git a/gdb/testsuite/gdb.base/gcore-excessive-memory.c b/gdb/testsuite/gdb.base/gcore-excessive-memory.c
|
||||||
|
new file mode 100644
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/gdb/testsuite/gdb.base/gcore-excessive-memory.c
|
||||||
@@ -0,0 +1,37 @@
|
@@ -0,0 +1,37 @@
|
||||||
+/* This testcase is part of GDB, the GNU debugger.
|
+/* This testcase is part of GDB, the GNU debugger.
|
||||||
+
|
+
|
||||||
|
@ -39,10 +48,11 @@ diff -u -X /home/jkratoch/.diffi.list -ruNp gdb-6.5/gdb/testsuite/gdb.base/gcore
|
||||||
+
|
+
|
||||||
+ return 0;
|
+ return 0;
|
||||||
+}
|
+}
|
||||||
diff -u -X /home/jkratoch/.diffi.list -ruNp gdb-6.5/gdb/testsuite/gdb.base/gcore-excessive-memory.exp gdb-6.5-unknown/gdb/testsuite/gdb.base/gcore-excessive-memory.exp
|
diff --git a/gdb/testsuite/gdb.base/gcore-excessive-memory.exp b/gdb/testsuite/gdb.base/gcore-excessive-memory.exp
|
||||||
--- gdb-6.5/gdb/testsuite/gdb.base/gcore-excessive-memory.exp 1970-01-01 01:00:00.000000000 +0100
|
new file mode 100644
|
||||||
+++ gdb-6.5-unknown/gdb/testsuite/gdb.base/gcore-excessive-memory.exp 2008-01-08 11:47:32.000000000 +0100
|
--- /dev/null
|
||||||
@@ -0,0 +1,101 @@
|
+++ b/gdb/testsuite/gdb.base/gcore-excessive-memory.exp
|
||||||
|
@@ -0,0 +1,94 @@
|
||||||
+# Copyright 2008 Free Software Foundation, Inc.
|
+# Copyright 2008 Free Software Foundation, Inc.
|
||||||
+
|
+
|
||||||
+# This program is free software; you can redistribute it and/or modify
|
+# This program is free software; you can redistribute it and/or modify
|
||||||
|
@ -59,18 +69,11 @@ diff -u -X /home/jkratoch/.diffi.list -ruNp gdb-6.5/gdb/testsuite/gdb.base/gcore
|
||||||
+# along with this program; if not, write to the Free Software
|
+# along with this program; if not, write to the Free Software
|
||||||
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
+
|
+
|
||||||
+if $tracelevel then {
|
|
||||||
+ strace $tracelevel
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+set prms_id 0
|
|
||||||
+set bug_id 0
|
|
||||||
+
|
|
||||||
+set testfile gcore-excessive-memory
|
+set testfile gcore-excessive-memory
|
||||||
+set srcfile ${testfile}.c
|
+set srcfile ${testfile}.c
|
||||||
+set shfile ${objdir}/${subdir}/${testfile}-gdb.sh
|
+set shfile [standard_output_file ${testfile}-gdb.sh]
|
||||||
+set corefile ${objdir}/${subdir}/${testfile}.core
|
+set corefile [standard_output_file ${testfile}.core]
|
||||||
+set binfile ${objdir}/${subdir}/${testfile}
|
+set binfile [standard_output_file ${testfile}]
|
||||||
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
|
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
|
||||||
+ untested "Couldn't compile test program"
|
+ untested "Couldn't compile test program"
|
||||||
+ return -1
|
+ return -1
|
||||||
|
|
|
@ -1,763 +0,0 @@
|
||||||
2006-10-01 Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
||||||
Fujitsu
|
|
||||||
|
|
||||||
* amd64-linux-nat.c: Support new linux_elfcore_write_prpsinfo,
|
|
||||||
linux_elfcore_write_prstatus, linux_elfcore_write_prfpreg.
|
|
||||||
(i386_linux_gregset32_reg_offset): New mapping for i386 on amd64.
|
|
||||||
* gcore.c (gcore_create_callback): Comment vdso Linux kernel bug.
|
|
||||||
* configure.ac: Check for <sys/user32.h>, <sys/procfs32.h>.
|
|
||||||
* configure, config.in: Regenerated.
|
|
||||||
* gdb_user32.h, gdb_procfs32.h: Define 32-bit core files even for
|
|
||||||
64-bit gdb, provide fallbacks for <sys/user32.h> and <sys/procfs32.h>.
|
|
||||||
* linux-nat.c: Virtualize `elfcore_*' by (*`linux_elfcore_*').
|
|
||||||
(linux_nat_do_thread_registers): Likewise.
|
|
||||||
(linux_nat_make_corefile_notes): Likewise.
|
|
||||||
* linux-nat.h: Likewise.
|
|
||||||
* Makefile.in: Dependencies updated.
|
|
||||||
|
|
||||||
2007-10-16 Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
||||||
|
|
||||||
Port to GDB-6.7.
|
|
||||||
|
|
||||||
2008-02-24 Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
||||||
|
|
||||||
Port to GDB-6.8pre.
|
|
||||||
|
|
||||||
Index: gdb-6.8cvs20080219/gdb/Makefile.in
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.8cvs20080219.orig/gdb/Makefile.in 2008-02-19 16:52:21.000000000 +0100
|
|
||||||
+++ gdb-6.8cvs20080219/gdb/Makefile.in 2008-02-20 13:39:08.000000000 +0100
|
|
||||||
@@ -785,6 +785,7 @@ gdb_expat_h = gdb_expat.h
|
|
||||||
gdb_locale_h = gdb_locale.h
|
|
||||||
gdb_obstack_h = gdb_obstack.h $(obstack_h)
|
|
||||||
gdb_proc_service_h = gdb_proc_service.h $(gregset_h)
|
|
||||||
+gdb_procfs32_h = gdb_procfs32.h $(gdb_user32_h)
|
|
||||||
gdb_ptrace_h = gdb_ptrace.h
|
|
||||||
gdb_regex_h = gdb_regex.h $(xregex_h)
|
|
||||||
gdb_select_h = gdb_select.h
|
|
||||||
@@ -794,6 +795,7 @@ gdb_string_h = gdb_string.h
|
|
||||||
gdb_thread_db_h = gdb_thread_db.h
|
|
||||||
gdbthread_h = gdbthread.h $(breakpoint_h) $(frame_h)
|
|
||||||
gdbtypes_h = gdbtypes.h $(hashtab_h)
|
|
||||||
+gdb_user32_h = gdb_user32.h $(gdb_stdint_h)
|
|
||||||
gdb_vfork_h = gdb_vfork.h
|
|
||||||
gdb_wait_h = gdb_wait.h
|
|
||||||
glibc_tdep_h = glibc-tdep.h
|
|
||||||
@@ -1888,7 +1890,8 @@ amd64fbsd-tdep.o: amd64fbsd-tdep.c $(def
|
|
||||||
amd64-linux-nat.o: amd64-linux-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) \
|
|
||||||
$(regcache_h) $(linux_nat_h) $(gdb_assert_h) $(gdb_string_h) \
|
|
||||||
$(gdb_proc_service_h) $(gregset_h) $(amd64_tdep_h) \
|
|
||||||
- $(i386_linux_tdep_h) $(amd64_nat_h) $(amd64_linux_tdep_h)
|
|
||||||
+ $(i386_linux_tdep_h) $(amd64_nat_h) $(amd64_linux_tdep_h) \
|
|
||||||
+ $(i387_tdep_h) $(elf_bfd_h) $(gdb_procfs32_h)
|
|
||||||
amd64-linux-tdep.o: amd64-linux-tdep.c $(defs_h) $(frame_h) $(gdbcore_h) \
|
|
||||||
$(regcache_h) $(osabi_h) $(symtab_h) $(gdb_string_h) $(amd64_tdep_h) \
|
|
||||||
$(solib_svr4_h) $(gdbtypes_h) $(reggroups_h) $(amd64_linux_tdep_h)
|
|
||||||
Index: gdb-6.8cvs20080219/gdb/amd64-linux-nat.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.8cvs20080219.orig/gdb/amd64-linux-nat.c 2008-02-16 19:10:27.000000000 +0100
|
|
||||||
+++ gdb-6.8cvs20080219/gdb/amd64-linux-nat.c 2008-02-20 13:39:08.000000000 +0100
|
|
||||||
@@ -50,6 +50,9 @@
|
|
||||||
#include "amd64-tdep.h"
|
|
||||||
#include "i386-linux-tdep.h"
|
|
||||||
#include "amd64-nat.h"
|
|
||||||
+#include "i387-tdep.h"
|
|
||||||
+#include "elf-bfd.h"
|
|
||||||
+#include "gdb_procfs32.h"
|
|
||||||
|
|
||||||
/* Mapping between the general-purpose registers in GNU/Linux x86-64
|
|
||||||
`struct user' format and GDB's register cache layout. */
|
|
||||||
@@ -84,6 +87,35 @@ static int amd64_linux_gregset64_reg_off
|
|
||||||
GNU/Linux i386 registers are all 32-bit, but since we're
|
|
||||||
little-endian we get away with that. */
|
|
||||||
|
|
||||||
+/* This info is not reusable from "i386-linux-nat.c" as gdb itself runs in
|
|
||||||
+ 64-bit mode and so ptrace(2) has 64-bit structure layout.
|
|
||||||
+ Just the corefile being generated has 32-bit layout so we need to do
|
|
||||||
+ a conversion specific to the i386-on-amd64 compatibility mode. */
|
|
||||||
+static int i386_linux_gregset32_reg_offset[] =
|
|
||||||
+{
|
|
||||||
+ 6 * 4, /* %eax */
|
|
||||||
+ 1 * 4, /* %ecx */
|
|
||||||
+ 2 * 4, /* %edx */
|
|
||||||
+ 0 * 4, /* %ebx */
|
|
||||||
+ 15 * 4, /* %esp */
|
|
||||||
+ 5 * 4, /* %ebp */
|
|
||||||
+ 3 * 4, /* %esi */
|
|
||||||
+ 4 * 4, /* %edi */
|
|
||||||
+ 12 * 4, /* %eip */
|
|
||||||
+ 14 * 4, /* %eflags */
|
|
||||||
+ 13 * 4, /* %cs */
|
|
||||||
+ 16 * 4, /* %ss */
|
|
||||||
+ 7 * 4, /* %ds */
|
|
||||||
+ 8 * 4, /* %es */
|
|
||||||
+ 9 * 4, /* %fs */
|
|
||||||
+ 10 * 4, /* %gs */
|
|
||||||
+ -1, -1, -1, -1, -1, -1, -1, -1,
|
|
||||||
+ -1, -1, -1, -1, -1, -1, -1, -1,
|
|
||||||
+ -1, -1, -1, -1, -1, -1, -1, -1,
|
|
||||||
+ -1,
|
|
||||||
+ 11 * 4 /* "orig_eax" */
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
/* From <sys/reg.h> on GNU/Linux i386. */
|
|
||||||
static int amd64_linux_gregset32_reg_offset[] =
|
|
||||||
{
|
|
||||||
@@ -102,6 +134,96 @@ static int amd64_linux_gregset32_reg_off
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
+/* This functions make ELF32 32-bit elfcore note sections
|
|
||||||
+ on amd64 environment. */
|
|
||||||
+
|
|
||||||
+static char *
|
|
||||||
+amd64_linux_elfcore_write_prpsinfo (bfd *abfd, char *buf, int *bufsiz,
|
|
||||||
+ const char *fname, const char *psargs)
|
|
||||||
+{
|
|
||||||
+ if (gdbarch_ptr_bit(current_gdbarch) == 32)
|
|
||||||
+ {
|
|
||||||
+ int note_type;
|
|
||||||
+ char *note_name = "CORE";
|
|
||||||
+ struct elf_prpsinfo32 data;
|
|
||||||
+ note_type = NT_PRPSINFO;
|
|
||||||
+
|
|
||||||
+ memset (&data, 0, sizeof (data));
|
|
||||||
+ strncpy (data.pr_fname, fname, sizeof (data.pr_fname));
|
|
||||||
+ strncpy (data.pr_psargs, psargs, sizeof (data.pr_psargs));
|
|
||||||
+ return elfcore_write_note (abfd, buf, bufsiz,
|
|
||||||
+ note_name, note_type, &data, sizeof (data));
|
|
||||||
+ }
|
|
||||||
+ else
|
|
||||||
+ return elfcore_write_prpsinfo (abfd, buf, bufsiz, fname, psargs);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static void
|
|
||||||
+amd64_linux_set_registers (const gdb_byte *gregs, gdb_byte *buf)
|
|
||||||
+{
|
|
||||||
+ int i;
|
|
||||||
+ /* Copy the i386 registers in the amd64 layout into i386 layout. */
|
|
||||||
+ for (i = 0; i < I386_NUM_GREGS; i++)
|
|
||||||
+ memcpy(buf + i386_linux_gregset32_reg_offset[i],
|
|
||||||
+ gregs + amd64_linux_gregset32_reg_offset[i], 4);
|
|
||||||
+ for (i = I386_CS_REGNUM; i <= I386_GS_REGNUM; i++)
|
|
||||||
+ memcpy(buf + i386_linux_gregset32_reg_offset[i],
|
|
||||||
+ gregs + amd64_linux_gregset32_reg_offset[i], 4);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static char *
|
|
||||||
+amd64_linux_elfcore_write_prstatus (bfd *abfd, char *buf, int *bufsiz,
|
|
||||||
+ long pid, int cursig, const void *gregs)
|
|
||||||
+{
|
|
||||||
+ if (gdbarch_ptr_bit(current_gdbarch) == 32)
|
|
||||||
+ {
|
|
||||||
+ char *note_name = "CORE";
|
|
||||||
+ struct elf_prstatus32 prstat;
|
|
||||||
+ memset (&prstat, 0, sizeof (prstat));
|
|
||||||
+ prstat.pr_pid = pid;
|
|
||||||
+ prstat.pr_cursig = cursig;
|
|
||||||
+ amd64_linux_set_registers (gregs, (gdb_byte *) &prstat.pr_reg);
|
|
||||||
+ return elfcore_write_note (abfd, buf, bufsiz, note_name,
|
|
||||||
+ NT_PRSTATUS, &prstat, sizeof (prstat));
|
|
||||||
+ }
|
|
||||||
+ else
|
|
||||||
+ return elfcore_write_prstatus (abfd, buf, bufsiz, pid, cursig, gregs);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static char *
|
|
||||||
+amd64_elfcore_write_prxfpreg32 (bfd *abfd, char *buf, int *bufsiz,
|
|
||||||
+ struct regcache *regcache)
|
|
||||||
+{
|
|
||||||
+ char *note_name = "LINUX";
|
|
||||||
+ elf_fpxregset32_t fpxregs32;
|
|
||||||
+
|
|
||||||
+ i387_collect_fxsave (regcache, -1, &fpxregs32);
|
|
||||||
+ return elfcore_write_note(abfd, buf, bufsiz,
|
|
||||||
+ note_name, NT_PRXFPREG, &fpxregs32,
|
|
||||||
+ sizeof(fpxregs32));
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static char *
|
|
||||||
+amd64_linux_elfcore_write_prfpreg (bfd *abfd, char *buf,
|
|
||||||
+ int *bufsiz, const void *fpregs, int size,
|
|
||||||
+ struct regcache *regcache)
|
|
||||||
+{
|
|
||||||
+ if (gdbarch_ptr_bit(current_gdbarch) == 32)
|
|
||||||
+ {
|
|
||||||
+ char *note_name = "CORE";
|
|
||||||
+ elf_fpregset32_t fpregs32;
|
|
||||||
+
|
|
||||||
+ i387_collect_fsave (regcache, -1, &fpregs32);
|
|
||||||
+ buf = elfcore_write_note(abfd, buf, bufsiz, note_name,
|
|
||||||
+ NT_FPREGSET, &fpregs32, sizeof(fpregs32));
|
|
||||||
+
|
|
||||||
+ return amd64_elfcore_write_prxfpreg32 (abfd, buf, bufsiz, regcache);
|
|
||||||
+ }
|
|
||||||
+ else
|
|
||||||
+ return elfcore_write_prfpreg (abfd, buf, bufsiz, fpregs, size);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+
|
|
||||||
/* Transfering the general-purpose registers between GDB, inferiors
|
|
||||||
and core files. */
|
|
||||||
|
|
||||||
@@ -429,6 +551,11 @@ _initialize_amd64_linux_nat (void)
|
|
||||||
t->to_fetch_registers = amd64_linux_fetch_inferior_registers;
|
|
||||||
t->to_store_registers = amd64_linux_store_inferior_registers;
|
|
||||||
|
|
||||||
+ /* This functions make elfcore note sections. */
|
|
||||||
+ linux_elfcore_write_prpsinfo = amd64_linux_elfcore_write_prpsinfo;
|
|
||||||
+ linux_elfcore_write_prstatus = amd64_linux_elfcore_write_prstatus;
|
|
||||||
+ linux_elfcore_write_prfpreg = amd64_linux_elfcore_write_prfpreg;
|
|
||||||
+
|
|
||||||
/* Register the target. */
|
|
||||||
linux_nat_add_target (t);
|
|
||||||
linux_nat_set_new_thread (t, amd64_linux_new_thread);
|
|
||||||
Index: gdb-6.8cvs20080219/gdb/config.in
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.8cvs20080219.orig/gdb/config.in 2008-01-10 19:17:06.000000000 +0100
|
|
||||||
+++ gdb-6.8cvs20080219/gdb/config.in 2008-02-20 13:39:08.000000000 +0100
|
|
||||||
@@ -385,6 +385,9 @@
|
|
||||||
/* Define to 1 if you have the <sys/poll.h> header file. */
|
|
||||||
#undef HAVE_SYS_POLL_H
|
|
||||||
|
|
||||||
+/* Define to 1 if you have the <sys/procfs32.h> header file. */
|
|
||||||
+#undef HAVE_SYS_PROCFS32_H
|
|
||||||
+
|
|
||||||
/* Define to 1 if you have the <sys/procfs.h> header file. */
|
|
||||||
#undef HAVE_SYS_PROCFS_H
|
|
||||||
|
|
||||||
@@ -412,6 +415,9 @@
|
|
||||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
|
||||||
#undef HAVE_SYS_TYPES_H
|
|
||||||
|
|
||||||
+/* Define to 1 if you have the <sys/user32.h> header file. */
|
|
||||||
+#undef HAVE_SYS_USER32_H
|
|
||||||
+
|
|
||||||
/* Define to 1 if you have the <sys/user.h> header file. */
|
|
||||||
#undef HAVE_SYS_USER_H
|
|
||||||
|
|
||||||
Index: gdb-6.8cvs20080219/gdb/configure
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.8cvs20080219.orig/gdb/configure 2008-02-14 23:03:56.000000000 +0100
|
|
||||||
+++ gdb-6.8cvs20080219/gdb/configure 2008-02-20 13:39:08.000000000 +0100
|
|
||||||
@@ -11140,6 +11140,157 @@ done
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
+for ac_header in sys/user32.h sys/procfs32.h
|
|
||||||
+do
|
|
||||||
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
|
|
||||||
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
|
|
||||||
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
|
|
||||||
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
|
|
||||||
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
|
|
||||||
+ echo $ECHO_N "(cached) $ECHO_C" >&6
|
|
||||||
+fi
|
|
||||||
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
|
|
||||||
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
|
|
||||||
+else
|
|
||||||
+ # Is the header compilable?
|
|
||||||
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
|
|
||||||
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
|
|
||||||
+cat >conftest.$ac_ext <<_ACEOF
|
|
||||||
+/* confdefs.h. */
|
|
||||||
+_ACEOF
|
|
||||||
+cat confdefs.h >>conftest.$ac_ext
|
|
||||||
+cat >>conftest.$ac_ext <<_ACEOF
|
|
||||||
+/* end confdefs.h. */
|
|
||||||
+$ac_includes_default
|
|
||||||
+#include <$ac_header>
|
|
||||||
+_ACEOF
|
|
||||||
+rm -f conftest.$ac_objext
|
|
||||||
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
|
||||||
+ (eval $ac_compile) 2>conftest.er1
|
|
||||||
+ ac_status=$?
|
|
||||||
+ grep -v '^ *+' conftest.er1 >conftest.err
|
|
||||||
+ rm -f conftest.er1
|
|
||||||
+ cat conftest.err >&5
|
|
||||||
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
|
||||||
+ (exit $ac_status); } &&
|
|
||||||
+ { ac_try='test -z "$ac_c_werror_flag"
|
|
||||||
+ || test ! -s conftest.err'
|
|
||||||
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
|
||||||
+ (eval $ac_try) 2>&5
|
|
||||||
+ ac_status=$?
|
|
||||||
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
|
||||||
+ (exit $ac_status); }; } &&
|
|
||||||
+ { ac_try='test -s conftest.$ac_objext'
|
|
||||||
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
|
||||||
+ (eval $ac_try) 2>&5
|
|
||||||
+ ac_status=$?
|
|
||||||
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
|
||||||
+ (exit $ac_status); }; }; then
|
|
||||||
+ ac_header_compiler=yes
|
|
||||||
+else
|
|
||||||
+ echo "$as_me: failed program was:" >&5
|
|
||||||
+sed 's/^/| /' conftest.$ac_ext >&5
|
|
||||||
+
|
|
||||||
+ac_header_compiler=no
|
|
||||||
+fi
|
|
||||||
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
|
|
||||||
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
|
|
||||||
+echo "${ECHO_T}$ac_header_compiler" >&6
|
|
||||||
+
|
|
||||||
+# Is the header present?
|
|
||||||
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
|
|
||||||
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
|
|
||||||
+cat >conftest.$ac_ext <<_ACEOF
|
|
||||||
+/* confdefs.h. */
|
|
||||||
+_ACEOF
|
|
||||||
+cat confdefs.h >>conftest.$ac_ext
|
|
||||||
+cat >>conftest.$ac_ext <<_ACEOF
|
|
||||||
+/* end confdefs.h. */
|
|
||||||
+#include <$ac_header>
|
|
||||||
+_ACEOF
|
|
||||||
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
|
|
||||||
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
|
|
||||||
+ ac_status=$?
|
|
||||||
+ grep -v '^ *+' conftest.er1 >conftest.err
|
|
||||||
+ rm -f conftest.er1
|
|
||||||
+ cat conftest.err >&5
|
|
||||||
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
|
||||||
+ (exit $ac_status); } >/dev/null; then
|
|
||||||
+ if test -s conftest.err; then
|
|
||||||
+ ac_cpp_err=$ac_c_preproc_warn_flag
|
|
||||||
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
|
|
||||||
+ else
|
|
||||||
+ ac_cpp_err=
|
|
||||||
+ fi
|
|
||||||
+else
|
|
||||||
+ ac_cpp_err=yes
|
|
||||||
+fi
|
|
||||||
+if test -z "$ac_cpp_err"; then
|
|
||||||
+ ac_header_preproc=yes
|
|
||||||
+else
|
|
||||||
+ echo "$as_me: failed program was:" >&5
|
|
||||||
+sed 's/^/| /' conftest.$ac_ext >&5
|
|
||||||
+
|
|
||||||
+ ac_header_preproc=no
|
|
||||||
+fi
|
|
||||||
+rm -f conftest.err conftest.$ac_ext
|
|
||||||
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
|
|
||||||
+echo "${ECHO_T}$ac_header_preproc" >&6
|
|
||||||
+
|
|
||||||
+# So? What about this header?
|
|
||||||
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
|
|
||||||
+ yes:no: )
|
|
||||||
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
|
|
||||||
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
|
|
||||||
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
|
|
||||||
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
|
|
||||||
+ ac_header_preproc=yes
|
|
||||||
+ ;;
|
|
||||||
+ no:yes:* )
|
|
||||||
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
|
|
||||||
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
|
|
||||||
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
|
|
||||||
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
|
|
||||||
+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
|
|
||||||
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
|
|
||||||
+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
|
|
||||||
+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
|
|
||||||
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
|
|
||||||
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
|
|
||||||
+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
|
|
||||||
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
|
|
||||||
+ (
|
|
||||||
+ cat <<\_ASBOX
|
|
||||||
+## ------------------------------------------ ##
|
|
||||||
+## Report this to the AC_PACKAGE_NAME lists. ##
|
|
||||||
+## ------------------------------------------ ##
|
|
||||||
+_ASBOX
|
|
||||||
+ ) |
|
|
||||||
+ sed "s/^/$as_me: WARNING: /" >&2
|
|
||||||
+ ;;
|
|
||||||
+esac
|
|
||||||
+echo "$as_me:$LINENO: checking for $ac_header" >&5
|
|
||||||
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
|
|
||||||
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
|
|
||||||
+ echo $ECHO_N "(cached) $ECHO_C" >&6
|
|
||||||
+else
|
|
||||||
+ eval "$as_ac_Header=\$ac_header_preproc"
|
|
||||||
+fi
|
|
||||||
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
|
|
||||||
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
|
|
||||||
+
|
|
||||||
+fi
|
|
||||||
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
|
|
||||||
+ cat >>confdefs.h <<_ACEOF
|
|
||||||
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
|
|
||||||
+_ACEOF
|
|
||||||
+
|
|
||||||
+fi
|
|
||||||
+
|
|
||||||
+done
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+
|
|
||||||
for ac_header in sys/wait.h wait.h
|
|
||||||
do
|
|
||||||
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
|
|
||||||
Index: gdb-6.8cvs20080219/gdb/configure.ac
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.8cvs20080219.orig/gdb/configure.ac 2008-02-14 23:03:56.000000000 +0100
|
|
||||||
+++ gdb-6.8cvs20080219/gdb/configure.ac 2008-02-20 13:39:08.000000000 +0100
|
|
||||||
@@ -523,6 +523,7 @@ AC_CHECK_HEADERS(sys/user.h, [], [],
|
|
||||||
# include <sys/param.h>
|
|
||||||
#endif
|
|
||||||
])
|
|
||||||
+AC_CHECK_HEADERS(sys/user32.h sys/procfs32.h)
|
|
||||||
AC_CHECK_HEADERS(sys/wait.h wait.h)
|
|
||||||
AC_CHECK_HEADERS(termios.h termio.h sgtty.h)
|
|
||||||
AC_CHECK_HEADERS(unistd.h)
|
|
||||||
Index: gdb-6.8cvs20080219/gdb/gcore.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.8cvs20080219.orig/gdb/gcore.c 2008-02-19 16:52:21.000000000 +0100
|
|
||||||
+++ gdb-6.8cvs20080219/gdb/gcore.c 2008-02-20 13:39:08.000000000 +0100
|
|
||||||
@@ -317,6 +317,11 @@ gcore_create_callback (CORE_ADDR vaddr,
|
|
||||||
asection *osec;
|
|
||||||
flagword flags = SEC_ALLOC | SEC_HAS_CONTENTS | SEC_LOAD;
|
|
||||||
|
|
||||||
+ /* Some Linux kernel versions around 2.6.17 have for i386 inferiors running
|
|
||||||
+ in compatibility mode on amd64 kernel their VSYSCALL page (at 0xffffe000)
|
|
||||||
+ protected as RWX==000 by default and gdb fails to read the library header
|
|
||||||
+ upon loading the core. This is a Linux kernel bug being fixed. */
|
|
||||||
+
|
|
||||||
/* If the memory segment has no permissions set, ignore it, otherwise
|
|
||||||
when we later try to access it for read/write, we'll get an error
|
|
||||||
or jam the kernel. */
|
|
||||||
Index: gdb-6.8cvs20080219/gdb/gdb_procfs32.h
|
|
||||||
===================================================================
|
|
||||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
|
||||||
+++ gdb-6.8cvs20080219/gdb/gdb_procfs32.h 2008-02-20 13:39:08.000000000 +0100
|
|
||||||
@@ -0,0 +1,128 @@
|
|
||||||
+#ifdef HAVE_SYS_PROCFS32_H
|
|
||||||
+#include <sys/procfs32.h>
|
|
||||||
+#else
|
|
||||||
+
|
|
||||||
+/* Copyright (C) 2006 Free Software Foundation, Inc.
|
|
||||||
+ This file is part of the GNU C Library.
|
|
||||||
+
|
|
||||||
+ The GNU C Library is free software; you can redistribute it and/or
|
|
||||||
+ modify it under the terms of the GNU Lesser General Public
|
|
||||||
+ License as published by the Free Software Foundation; either
|
|
||||||
+ version 2.1 of the License, or (at your option) any later version.
|
|
||||||
+
|
|
||||||
+ The GNU C Library is distributed in the hope that it will be useful,
|
|
||||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
+ Lesser General Public License for more details.
|
|
||||||
+
|
|
||||||
+ You should have received a copy of the GNU Lesser General Public
|
|
||||||
+ License along with the GNU C Library; if not, write to the Free
|
|
||||||
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
|
||||||
+ 02111-1307 USA. */
|
|
||||||
+
|
|
||||||
+#ifndef _SYS_PROCFS32_H
|
|
||||||
+#define _SYS_PROCFS32_H 1
|
|
||||||
+
|
|
||||||
+/* This is somewhat modelled after the file of the same name on SVR4
|
|
||||||
+ systems. It provides a definition of the core file format for ELF
|
|
||||||
+ used on Linux. It doesn't have anything to do with the /proc file
|
|
||||||
+ system, even though Linux has one.
|
|
||||||
+
|
|
||||||
+ Anyway, the whole purpose of this file is for GDB and GDB only.
|
|
||||||
+ Don't read too much into it. Don't use it for anything other than
|
|
||||||
+ GDB unless you know what you are doing. */
|
|
||||||
+
|
|
||||||
+#include <features.h>
|
|
||||||
+#include <sys/time.h>
|
|
||||||
+#include <sys/types.h>
|
|
||||||
+#include "gdb_user32.h"
|
|
||||||
+
|
|
||||||
+/* We define here only the symbols differing from their 64-bit variant. */
|
|
||||||
+#include <sys/procfs.h>
|
|
||||||
+
|
|
||||||
+__BEGIN_DECLS
|
|
||||||
+
|
|
||||||
+/* Type for a general-purpose register. */
|
|
||||||
+typedef unsigned int elf_greg32_t;
|
|
||||||
+
|
|
||||||
+/* And the whole bunch of them. We could have used `struct
|
|
||||||
+ user_regs_struct' directly in the typedef, but tradition says that
|
|
||||||
+ the register set is an array, which does have some peculiar
|
|
||||||
+ semantics, so leave it that way. */
|
|
||||||
+#define ELF_NGREG32 (sizeof (struct user_regs32_struct) / sizeof(elf_greg32_t))
|
|
||||||
+typedef elf_greg32_t elf_gregset32_t[ELF_NGREG32];
|
|
||||||
+
|
|
||||||
+/* Register set for the floating-point registers. */
|
|
||||||
+typedef struct user_fpregs32_struct elf_fpregset32_t;
|
|
||||||
+
|
|
||||||
+/* Register set for the extended floating-point registers. Includes
|
|
||||||
+ the Pentium III SSE registers in addition to the classic
|
|
||||||
+ floating-point stuff. */
|
|
||||||
+typedef struct user_fpxregs32_struct elf_fpxregset32_t;
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+/* Definitions to generate Intel SVR4-like core files. These mostly
|
|
||||||
+ have the same names as the SVR4 types with "elf_" tacked on the
|
|
||||||
+ front to prevent clashes with Linux definitions, and the typedef
|
|
||||||
+ forms have been avoided. This is mostly like the SVR4 structure,
|
|
||||||
+ but more Linuxy, with things that Linux does not support and which
|
|
||||||
+ GDB doesn't really use excluded. */
|
|
||||||
+
|
|
||||||
+struct prstatus32_timeval
|
|
||||||
+ {
|
|
||||||
+ int tv_sec;
|
|
||||||
+ int tv_usec;
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+struct elf_prstatus32
|
|
||||||
+ {
|
|
||||||
+ struct elf_siginfo pr_info; /* Info associated with signal. */
|
|
||||||
+ short int pr_cursig; /* Current signal. */
|
|
||||||
+ unsigned int pr_sigpend; /* Set of pending signals. */
|
|
||||||
+ unsigned int pr_sighold; /* Set of held signals. */
|
|
||||||
+ __pid_t pr_pid;
|
|
||||||
+ __pid_t pr_ppid;
|
|
||||||
+ __pid_t pr_pgrp;
|
|
||||||
+ __pid_t pr_sid;
|
|
||||||
+ struct prstatus32_timeval pr_utime; /* User time. */
|
|
||||||
+ struct prstatus32_timeval pr_stime; /* System time. */
|
|
||||||
+ struct prstatus32_timeval pr_cutime; /* Cumulative user time. */
|
|
||||||
+ struct prstatus32_timeval pr_cstime; /* Cumulative system time. */
|
|
||||||
+ elf_gregset32_t pr_reg; /* GP registers. */
|
|
||||||
+ int pr_fpvalid; /* True if math copro being used. */
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+struct elf_prpsinfo32
|
|
||||||
+ {
|
|
||||||
+ char pr_state; /* Numeric process state. */
|
|
||||||
+ char pr_sname; /* Char for pr_state. */
|
|
||||||
+ char pr_zomb; /* Zombie. */
|
|
||||||
+ char pr_nice; /* Nice val. */
|
|
||||||
+ unsigned int pr_flag; /* Flags. */
|
|
||||||
+ unsigned short int pr_uid;
|
|
||||||
+ unsigned short int pr_gid;
|
|
||||||
+ int pr_pid, pr_ppid, pr_pgrp, pr_sid;
|
|
||||||
+ /* Lots missing */
|
|
||||||
+ char pr_fname[16]; /* Filename of executable. */
|
|
||||||
+ char pr_psargs[ELF_PRARGSZ]; /* Initial part of arg list. */
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+/* The rest of this file provides the types for emulation of the
|
|
||||||
+ Solaris <proc_service.h> interfaces that should be implemented by
|
|
||||||
+ users of libthread_db. */
|
|
||||||
+
|
|
||||||
+/* Register sets. Linux has different names. */
|
|
||||||
+typedef elf_gregset_t prgregset32_t;
|
|
||||||
+typedef elf_fpregset_t prfpregset32_t;
|
|
||||||
+
|
|
||||||
+/* Process status and info. In the end we do provide typedefs for them. */
|
|
||||||
+typedef struct elf_prstatus32 prstatus32_t;
|
|
||||||
+typedef struct elf_prpsinfo32 prpsinfo32_t;
|
|
||||||
+
|
|
||||||
+__END_DECLS
|
|
||||||
+
|
|
||||||
+#endif /* _SYS_PROCFS32_H */
|
|
||||||
+
|
|
||||||
+#endif /* HAVE_SYS_PROCFS32_H */
|
|
||||||
Index: gdb-6.8cvs20080219/gdb/gdb_user32.h
|
|
||||||
===================================================================
|
|
||||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
|
||||||
+++ gdb-6.8cvs20080219/gdb/gdb_user32.h 2008-02-20 13:39:08.000000000 +0100
|
|
||||||
@@ -0,0 +1,108 @@
|
|
||||||
+#ifdef HAVE_SYS_USER32_H
|
|
||||||
+#include <sys/user32.h>
|
|
||||||
+#else
|
|
||||||
+
|
|
||||||
+#ifdef HAVE_STDINT_H
|
|
||||||
+#include <stdint.h>
|
|
||||||
+typedef int32_t gdb_int32_t;
|
|
||||||
+typedef uint32_t gdb_uint32_t;
|
|
||||||
+#else
|
|
||||||
+typedef signed int gdb_uint32_t;
|
|
||||||
+typedef unsigned int gdb_uint32_t;
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
+/* Copyright (C) 2006 Free Software Foundation, Inc.
|
|
||||||
+ This file is part of the GNU C Library.
|
|
||||||
+
|
|
||||||
+ The GNU C Library is free software; you can redistribute it and/or
|
|
||||||
+ modify it under the terms of the GNU Lesser General Public
|
|
||||||
+ License as published by the Free Software Foundation; either
|
|
||||||
+ version 2.1 of the License, or (at your option) any later version.
|
|
||||||
+
|
|
||||||
+ The GNU C Library is distributed in the hope that it will be useful,
|
|
||||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
+ Lesser General Public License for more details.
|
|
||||||
+
|
|
||||||
+ You should have received a copy of the GNU Lesser General Public
|
|
||||||
+ License along with the GNU C Library; if not, write to the Free
|
|
||||||
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
|
||||||
+ 02111-1307 USA. */
|
|
||||||
+
|
|
||||||
+#ifndef _SYS_USER32_H
|
|
||||||
+#define _SYS_USER32_H 1
|
|
||||||
+
|
|
||||||
+/* These are the 32-bit x86 structures. */
|
|
||||||
+
|
|
||||||
+struct user_fpregs32_struct
|
|
||||||
+{
|
|
||||||
+ int32_t cwd;
|
|
||||||
+ int32_t swd;
|
|
||||||
+ int32_t twd;
|
|
||||||
+ int32_t fip;
|
|
||||||
+ int32_t fcs;
|
|
||||||
+ int32_t foo;
|
|
||||||
+ int32_t fos;
|
|
||||||
+ int32_t st_space [20];
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+struct user_fpxregs32_struct
|
|
||||||
+{
|
|
||||||
+ unsigned short int cwd;
|
|
||||||
+ unsigned short int swd;
|
|
||||||
+ unsigned short int twd;
|
|
||||||
+ unsigned short int fop;
|
|
||||||
+ int32_t fip;
|
|
||||||
+ int32_t fcs;
|
|
||||||
+ int32_t foo;
|
|
||||||
+ int32_t fos;
|
|
||||||
+ int32_t mxcsr;
|
|
||||||
+ int32_t reserved;
|
|
||||||
+ int32_t st_space[32]; /* 8*16 bytes for each FP-reg = 128 bytes */
|
|
||||||
+ int32_t xmm_space[32]; /* 8*16 bytes for each XMM-reg = 128 bytes */
|
|
||||||
+ int32_t padding[56];
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+struct user_regs32_struct
|
|
||||||
+{
|
|
||||||
+ int32_t ebx;
|
|
||||||
+ int32_t ecx;
|
|
||||||
+ int32_t edx;
|
|
||||||
+ int32_t esi;
|
|
||||||
+ int32_t edi;
|
|
||||||
+ int32_t ebp;
|
|
||||||
+ int32_t eax;
|
|
||||||
+ int32_t xds;
|
|
||||||
+ int32_t xes;
|
|
||||||
+ int32_t xfs;
|
|
||||||
+ int32_t xgs;
|
|
||||||
+ int32_t orig_eax;
|
|
||||||
+ int32_t eip;
|
|
||||||
+ int32_t xcs;
|
|
||||||
+ int32_t eflags;
|
|
||||||
+ int32_t esp;
|
|
||||||
+ int32_t xss;
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+struct user32
|
|
||||||
+{
|
|
||||||
+ struct user_regs32_struct regs;
|
|
||||||
+ int u_fpvalid;
|
|
||||||
+ struct user_fpregs32_struct i387;
|
|
||||||
+ uint32_t u_tsize;
|
|
||||||
+ uint32_t u_dsize;
|
|
||||||
+ uint32_t u_ssize;
|
|
||||||
+ uint32_t start_code;
|
|
||||||
+ uint32_t start_stack;
|
|
||||||
+ int32_t signal;
|
|
||||||
+ int reserved;
|
|
||||||
+ struct user_regs32_struct* u_ar0;
|
|
||||||
+ struct user_fpregs32_struct* u_fpstate;
|
|
||||||
+ uint32_t magic;
|
|
||||||
+ char u_comm [32];
|
|
||||||
+ int u_debugreg [8];
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+#endif /* _SYS_USER32_H */
|
|
||||||
+
|
|
||||||
+#endif /* HAVE_SYS_USER32_H */
|
|
||||||
Index: gdb-6.8cvs20080219/gdb/linux-nat.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.8cvs20080219.orig/gdb/linux-nat.c 2008-02-19 17:27:21.000000000 +0100
|
|
||||||
+++ gdb-6.8cvs20080219/gdb/linux-nat.c 2008-02-20 13:39:08.000000000 +0100
|
|
||||||
@@ -104,6 +104,21 @@ static LONGEST (*super_xfer_partial) (st
|
|
||||||
const gdb_byte *,
|
|
||||||
ULONGEST, LONGEST);
|
|
||||||
|
|
||||||
+/* This functions make elfcore note sections.
|
|
||||||
+ They may get overriden by code adjusting data for multi-target builds. */
|
|
||||||
+char *(*linux_elfcore_write_prpsinfo)
|
|
||||||
+ (bfd *, char *, int *, const char *, const char *) = elfcore_write_prpsinfo;
|
|
||||||
+char *(*linux_elfcore_write_prstatus)
|
|
||||||
+ (bfd *, char *, int *, long, int, const void *) = elfcore_write_prstatus;
|
|
||||||
+static char *
|
|
||||||
+linux_elfcore_write_prfpreg_bfd (bfd *abfd, char *buf, int *bufsiz,
|
|
||||||
+ const void *fpregs, int size, struct regcache *regcache)
|
|
||||||
+{
|
|
||||||
+ return elfcore_write_prfpreg (abfd, buf, bufsiz, fpregs, size);
|
|
||||||
+}
|
|
||||||
+char *(*linux_elfcore_write_prfpreg) (bfd *, char *, int *, const void *, int,
|
|
||||||
+ struct regcache *) = linux_elfcore_write_prfpreg_bfd;
|
|
||||||
+
|
|
||||||
static int debug_linux_nat;
|
|
||||||
static void
|
|
||||||
show_debug_linux_nat (struct ui_file *file, int from_tty,
|
|
||||||
@@ -2716,11 +2731,11 @@ linux_nat_do_thread_registers (bfd *obfd
|
|
||||||
else
|
|
||||||
fill_gregset (regcache, &gregs, -1);
|
|
||||||
|
|
||||||
- note_data = (char *) elfcore_write_prstatus (obfd,
|
|
||||||
- note_data,
|
|
||||||
- note_size,
|
|
||||||
- lwp,
|
|
||||||
- stop_signal, &gregs);
|
|
||||||
+ note_data = (char *) linux_elfcore_write_prstatus (obfd,
|
|
||||||
+ note_data,
|
|
||||||
+ note_size,
|
|
||||||
+ lwp,
|
|
||||||
+ stop_signal, &gregs);
|
|
||||||
|
|
||||||
if (core_regset_p
|
|
||||||
&& (regset = gdbarch_regset_from_core_section (gdbarch, ".reg2",
|
|
||||||
@@ -2731,10 +2746,11 @@ linux_nat_do_thread_registers (bfd *obfd
|
|
||||||
else
|
|
||||||
fill_fpregset (regcache, &fpregs, -1);
|
|
||||||
|
|
||||||
- note_data = (char *) elfcore_write_prfpreg (obfd,
|
|
||||||
- note_data,
|
|
||||||
- note_size,
|
|
||||||
- &fpregs, sizeof (fpregs));
|
|
||||||
+ note_data = (char *) linux_elfcore_write_prfpreg (obfd,
|
|
||||||
+ note_data,
|
|
||||||
+ note_size,
|
|
||||||
+ &fpregs, sizeof (fpregs),
|
|
||||||
+ regcache);
|
|
||||||
|
|
||||||
#ifdef FILL_FPXREGSET
|
|
||||||
if (core_regset_p
|
|
||||||
@@ -2828,9 +2844,9 @@ linux_nat_make_corefile_notes (bfd *obfd
|
|
||||||
psargs_end - string_end);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
- note_data = (char *) elfcore_write_prpsinfo (obfd,
|
|
||||||
- note_data,
|
|
||||||
- note_size, fname, psargs);
|
|
||||||
+ note_data = (char *) linux_elfcore_write_prpsinfo (obfd, note_data,
|
|
||||||
+ note_size, fname,
|
|
||||||
+ psargs);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Dump information for threads. */
|
|
||||||
Index: gdb-6.8cvs20080219/gdb/linux-nat.h
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.8cvs20080219.orig/gdb/linux-nat.h 2008-02-19 14:26:32.000000000 +0100
|
|
||||||
+++ gdb-6.8cvs20080219/gdb/linux-nat.h 2008-02-20 13:39:37.000000000 +0100
|
|
||||||
@@ -124,3 +124,12 @@ void linux_nat_switch_fork (ptid_t new_p
|
|
||||||
|
|
||||||
/* Return the saved siginfo associated with PTID. */
|
|
||||||
struct siginfo *linux_nat_get_siginfo (ptid_t ptid);
|
|
||||||
+
|
|
||||||
+/* These functions make elfcore note sections.
|
|
||||||
+ They may get overriden by code adjusting data for multi-target builds. */
|
|
||||||
+extern char *(*linux_elfcore_write_prpsinfo)
|
|
||||||
+ (bfd *, char *, int *, const char *, const char *);
|
|
||||||
+extern char *(*linux_elfcore_write_prstatus)
|
|
||||||
+ (bfd *, char *, int *, long, int, const void *);
|
|
||||||
+extern char *(*linux_elfcore_write_prfpreg)
|
|
||||||
+ (bfd *, char *, int *, const void *, int, struct regcache *);
|
|
|
@ -1,6 +1,15 @@
|
||||||
diff -u -rup gdb-6.3-orig/gdb/testsuite/gdb.base/unwind-leak.c gdb-6.3/gdb/testsuite/gdb.base/unwind-leak.c
|
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||||
--- gdb-6.3-orig/gdb/testsuite/gdb.base/unwind-leak.c 2007-12-19 15:12:55.000000000 -0500
|
From: Fedora GDB patches <invalid@email.com>
|
||||||
+++ gdb-6.3/gdb/testsuite/gdb.base/unwind-leak.c 2007-12-19 13:55:22.000000000 -0500
|
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||||
|
Subject: gdb-6.5-ia64-libunwind-leak-test.patch
|
||||||
|
|
||||||
|
;; Test ia64 memory leaks of the code using libunwind.
|
||||||
|
;;=fedoratest
|
||||||
|
|
||||||
|
diff --git a/gdb/testsuite/gdb.base/unwind-leak.c b/gdb/testsuite/gdb.base/unwind-leak.c
|
||||||
|
new file mode 100644
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/gdb/testsuite/gdb.base/unwind-leak.c
|
||||||
@@ -0,0 +1,29 @@
|
@@ -0,0 +1,29 @@
|
||||||
+/* This testcase is part of GDB, the GNU debugger.
|
+/* This testcase is part of GDB, the GNU debugger.
|
||||||
+
|
+
|
||||||
|
@ -31,10 +40,11 @@ diff -u -rup gdb-6.3-orig/gdb/testsuite/gdb.base/unwind-leak.c gdb-6.3/gdb/tests
|
||||||
+ alarm (0);
|
+ alarm (0);
|
||||||
+ return 0;
|
+ return 0;
|
||||||
+}
|
+}
|
||||||
diff -u -rup gdb-6.3-orig/gdb/testsuite/gdb.base/unwind-leak.exp gdb-6.3/gdb/testsuite/gdb.base/unwind-leak.exp
|
diff --git a/gdb/testsuite/gdb.base/unwind-leak.exp b/gdb/testsuite/gdb.base/unwind-leak.exp
|
||||||
--- gdb-6.3-orig/gdb/testsuite/gdb.base/unwind-leak.exp 2007-12-19 15:12:53.000000000 -0500
|
new file mode 100644
|
||||||
+++ gdb-6.3/gdb/testsuite/gdb.base/unwind-leak.exp 2007-12-19 15:11:35.000000000 -0500
|
--- /dev/null
|
||||||
@@ -0,0 +1,90 @@
|
+++ b/gdb/testsuite/gdb.base/unwind-leak.exp
|
||||||
|
@@ -0,0 +1,83 @@
|
||||||
+# Copyright 2007 Free Software Foundation, Inc.
|
+# Copyright 2007 Free Software Foundation, Inc.
|
||||||
+
|
+
|
||||||
+# This program is free software; you can redistribute it and/or modify
|
+# This program is free software; you can redistribute it and/or modify
|
||||||
|
@ -51,17 +61,10 @@ diff -u -rup gdb-6.3-orig/gdb/testsuite/gdb.base/unwind-leak.exp gdb-6.3/gdb/tes
|
||||||
+# along with this program; if not, write to the Free Software
|
+# along with this program; if not, write to the Free Software
|
||||||
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
+
|
+
|
||||||
+if $tracelevel then {
|
|
||||||
+ strace $tracelevel
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+set prms_id 0
|
|
||||||
+set bug_id 0
|
|
||||||
+
|
|
||||||
+set testfile unwind-leak
|
+set testfile unwind-leak
|
||||||
+set srcfile ${testfile}.c
|
+set srcfile ${testfile}.c
|
||||||
+set shfile ${objdir}/${subdir}/${testfile}-gdb.sh
|
+set shfile [standard_output_file ${testfile}-gdb.sh]
|
||||||
+set binfile ${objdir}/${subdir}/${testfile}
|
+set binfile [standard_output_file ${testfile}]
|
||||||
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
|
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
|
||||||
+ untested "Couldn't compile test program"
|
+ untested "Couldn't compile test program"
|
||||||
+ return -1
|
+ return -1
|
||||||
|
|
|
@ -1,9 +1,15 @@
|
||||||
Index: ./gdb/testsuite/gdb.base/largecore-last-address-lock.exp
|
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||||
===================================================================
|
From: Fedora GDB patches <invalid@email.com>
|
||||||
RCS file: ./gdb/testsuite/gdb.base/largecore-last-address-lock.exp
|
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||||
diff -N ./gdb/testsuite/gdb.base/largecore-last-address-lock.exp
|
Subject: gdb-6.5-last-address-space-byte-test.patch
|
||||||
--- /dev/null 1 Jan 1970 00:00:00 -0000
|
|
||||||
+++ ./gdb/testsuite/gdb.base/largecore-last-address-lock.exp 15 Nov 2006 21:43:24 -0000
|
;; Testcase for deadlocking on last address space byte; for corrupted backtraces.
|
||||||
|
;;=fedoratest
|
||||||
|
|
||||||
|
diff --git a/gdb/testsuite/gdb.base/largecore-last-address-lock.exp b/gdb/testsuite/gdb.base/largecore-last-address-lock.exp
|
||||||
|
new file mode 100644
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/gdb/testsuite/gdb.base/largecore-last-address-lock.exp
|
||||||
@@ -0,0 +1,49 @@
|
@@ -0,0 +1,49 @@
|
||||||
+# Copyright 2006 Free Software Foundation, Inc.
|
+# Copyright 2006 Free Software Foundation, Inc.
|
||||||
+
|
+
|
||||||
|
|
|
@ -1,62 +1,18 @@
|
||||||
|
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||||
|
From: Fedora GDB patches <invalid@email.com>
|
||||||
|
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||||
|
Subject: gdb-6.5-missed-trap-on-step-test.patch
|
||||||
|
|
||||||
|
;; Test hiding unexpected breakpoints on intentional step commands.
|
||||||
|
;;=fedoratest
|
||||||
|
|
||||||
Fix has been committed to:
|
Fix has been committed to:
|
||||||
gdb-6.6-scheduler_locking-step-sw-watchpoints2.patch
|
gdb-6.6-scheduler_locking-step-sw-watchpoints2.patch
|
||||||
|
|
||||||
--- /dev/null 2007-12-14 20:45:09.113039517 +0100
|
diff --git a/gdb/testsuite/gdb.base/watchpoint-during-step.c b/gdb/testsuite/gdb.base/watchpoint-during-step.c
|
||||||
+++ gdb-6.5/gdb/testsuite/gdb.base/watchpoint-during-step.exp 2007-12-24 19:42:00.000000000 +0100
|
new file mode 100644
|
||||||
@@ -0,0 +1,51 @@
|
--- /dev/null
|
||||||
+# Copyright 2007 Free Software Foundation, Inc.
|
+++ b/gdb/testsuite/gdb.base/watchpoint-during-step.c
|
||||||
+
|
|
||||||
+# This program is free software; you can redistribute it and/or modify
|
|
||||||
+# it under the terms of the GNU General Public License as published by
|
|
||||||
+# the Free Software Foundation; either version 2 of the License, or
|
|
||||||
+# (at your option) any later version.
|
|
||||||
+#
|
|
||||||
+# This program is distributed in the hope that it will be useful,
|
|
||||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
+# GNU General Public License for more details.
|
|
||||||
+#
|
|
||||||
+# You should have received a copy of the GNU General Public License
|
|
||||||
+# along with this program; if not, write to the Free Software
|
|
||||||
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
+
|
|
||||||
+if $tracelevel then {
|
|
||||||
+ strace $tracelevel
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+set prms_id 0
|
|
||||||
+set bug_id 0
|
|
||||||
+
|
|
||||||
+set testfile watchpoint-during-step
|
|
||||||
+set srcfile ${testfile}.c
|
|
||||||
+set binfile ${objdir}/${subdir}/${testfile}
|
|
||||||
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
|
|
||||||
+ untested "Couldn't compile test program"
|
|
||||||
+ return -1
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+# Get things started.
|
|
||||||
+
|
|
||||||
+gdb_exit
|
|
||||||
+gdb_start
|
|
||||||
+gdb_reinitialize_dir $srcdir/$subdir
|
|
||||||
+gdb_load ${binfile}
|
|
||||||
+
|
|
||||||
+runto_main
|
|
||||||
+
|
|
||||||
+gdb_breakpoint [gdb_get_line_number "var = 2"]
|
|
||||||
+gdb_continue_to_breakpoint "Find the first var set"
|
|
||||||
+
|
|
||||||
+gdb_test "step" ".*var = 3;" "Step to the next var set"
|
|
||||||
+
|
|
||||||
+gdb_test "watch var" "atchpoint .*: var" "Set the watchpoint"
|
|
||||||
+
|
|
||||||
+# Here is the target point. Be careful to not have breakpoint set on the line
|
|
||||||
+# we step from as in this case it is a valid upstream KFAIL gdb/38
|
|
||||||
+
|
|
||||||
+gdb_test "step" ".*Old value = 2.*New value = 3.*" "Catch the watchpoint"
|
|
||||||
--- /dev/null 2007-12-14 20:45:09.113039517 +0100
|
|
||||||
+++ gdb-6.5/gdb/testsuite/gdb.base/watchpoint-during-step.c 2007-12-24 19:38:10.000000000 +0100
|
|
||||||
@@ -0,0 +1,30 @@
|
@@ -0,0 +1,30 @@
|
||||||
+/* This testcase is part of GDB, the GNU debugger.
|
+/* This testcase is part of GDB, the GNU debugger.
|
||||||
+
|
+
|
||||||
|
@ -88,3 +44,52 @@ Fix has been committed to:
|
||||||
+ var = 3;
|
+ var = 3;
|
||||||
+ return 0;
|
+ return 0;
|
||||||
+}
|
+}
|
||||||
|
diff --git a/gdb/testsuite/gdb.base/watchpoint-during-step.exp b/gdb/testsuite/gdb.base/watchpoint-during-step.exp
|
||||||
|
new file mode 100644
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/gdb/testsuite/gdb.base/watchpoint-during-step.exp
|
||||||
|
@@ -0,0 +1,44 @@
|
||||||
|
+# Copyright 2007 Free Software Foundation, Inc.
|
||||||
|
+
|
||||||
|
+# This program is free software; you can redistribute it and/or modify
|
||||||
|
+# it under the terms of the GNU General Public License as published by
|
||||||
|
+# the Free Software Foundation; either version 2 of the License, or
|
||||||
|
+# (at your option) any later version.
|
||||||
|
+#
|
||||||
|
+# This program is distributed in the hope that it will be useful,
|
||||||
|
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
+# GNU General Public License for more details.
|
||||||
|
+#
|
||||||
|
+# You should have received a copy of the GNU General Public License
|
||||||
|
+# along with this program; if not, write to the Free Software
|
||||||
|
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
+
|
||||||
|
+set testfile watchpoint-during-step
|
||||||
|
+set srcfile ${testfile}.c
|
||||||
|
+set binfile [standard_output_file ${testfile}]
|
||||||
|
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
|
||||||
|
+ untested "Couldn't compile test program"
|
||||||
|
+ return -1
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+# Get things started.
|
||||||
|
+
|
||||||
|
+gdb_exit
|
||||||
|
+gdb_start
|
||||||
|
+gdb_reinitialize_dir $srcdir/$subdir
|
||||||
|
+gdb_load ${binfile}
|
||||||
|
+
|
||||||
|
+runto_main
|
||||||
|
+
|
||||||
|
+gdb_breakpoint [gdb_get_line_number "var = 2"]
|
||||||
|
+gdb_continue_to_breakpoint "Find the first var set"
|
||||||
|
+
|
||||||
|
+gdb_test "step" ".*var = 3;" "Step to the next var set"
|
||||||
|
+
|
||||||
|
+gdb_test "watch var" "atchpoint .*: var" "Set the watchpoint"
|
||||||
|
+
|
||||||
|
+# Here is the target point. Be careful to not have breakpoint set on the line
|
||||||
|
+# we step from as in this case it is a valid upstream KFAIL gdb/38
|
||||||
|
+
|
||||||
|
+gdb_test "step" ".*Old value = 2.*New value = 3.*" "Catch the watchpoint"
|
||||||
|
|
|
@ -1,13 +1,18 @@
|
||||||
|
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||||
|
From: Fedora GDB patches <invalid@email.com>
|
||||||
|
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||||
|
Subject: gdb-6.5-readline-long-line-crash-test.patch
|
||||||
|
|
||||||
|
;; Fix readline segfault on excessively long hand-typed lines.
|
||||||
|
;;=fedoratest
|
||||||
|
|
||||||
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=214196
|
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=214196
|
||||||
|
|
||||||
|
diff --git a/gdb/testsuite/gdb.base/readline-overflow.exp b/gdb/testsuite/gdb.base/readline-overflow.exp
|
||||||
Index: ./gdb/testsuite/gdb.base/readline-overflow.exp
|
new file mode 100644
|
||||||
===================================================================
|
--- /dev/null
|
||||||
RCS file: ./gdb/testsuite/gdb.base/readline-overflow.exp
|
+++ b/gdb/testsuite/gdb.base/readline-overflow.exp
|
||||||
diff -N ./gdb/testsuite/gdb.base/readline-overflow.exp
|
@@ -0,0 +1,104 @@
|
||||||
--- /dev/null 1 Jan 1970 00:00:00 -0000
|
|
||||||
+++ ./gdb/testsuite/gdb.base/readline-overflow.exp 13 Nov 2006 23:42:50 -0000
|
|
||||||
@@ -0,0 +1,125 @@
|
|
||||||
+# Copyright 2006 Free Software Foundation, Inc.
|
+# Copyright 2006 Free Software Foundation, Inc.
|
||||||
+
|
+
|
||||||
+# This program is free software; you can redistribute it and/or modify
|
+# This program is free software; you can redistribute it and/or modify
|
||||||
|
@ -39,27 +44,24 @@ diff -N ./gdb/testsuite/gdb.base/readline-overflow.exp
|
||||||
+ strace $tracelevel
|
+ strace $tracelevel
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
|
+global env
|
||||||
|
+
|
||||||
|
+save_vars { env(INPUTRC) env(GDBHISTFILE) env(HISTSIZE) TERM timeout } {
|
||||||
|
+ # The arrow key test relies on the standard VT100 bindings, so
|
||||||
|
+ # make sure that an appropriate terminal is selected. The same
|
||||||
|
+ # bug doesn't show up if we use ^P / ^N instead.
|
||||||
|
+ setenv TERM vt100
|
||||||
|
+
|
||||||
+ # Don't let a .inputrc file or an existing setting of INPUTRC mess up
|
+ # Don't let a .inputrc file or an existing setting of INPUTRC mess up
|
||||||
+ # the test results. Even if /dev/null doesn't exist on the particular
|
+ # the test results. Even if /dev/null doesn't exist on the particular
|
||||||
+ # platform, the readline library will use the default setting just by
|
+ # platform, the readline library will use the default setting just by
|
||||||
+ # failing to open the file. OTOH, opening /dev/null successfully will
|
+ # failing to open the file. OTOH, opening /dev/null successfully will
|
||||||
+ # also result in the default settings being used since nothing will be
|
+ # also result in the default settings being used since nothing will be
|
||||||
+ # read from this file.
|
+ # read from this file.
|
||||||
+global env
|
|
||||||
+if [info exists env(INPUTRC)] {
|
|
||||||
+ set old_inputrc $env(INPUTRC)
|
|
||||||
+}
|
|
||||||
+ set env(INPUTRC) "/dev/null"
|
+ set env(INPUTRC) "/dev/null"
|
||||||
+
|
+
|
||||||
+set oldtimeout1 $timeout
|
|
||||||
+ set timeout 600
|
+ set timeout 600
|
||||||
+
|
+
|
||||||
+if [info exists env(GDBHISTFILE)] {
|
|
||||||
+ set old_gdbhistfile $env(GDBHISTFILE)
|
|
||||||
+}
|
|
||||||
+if [info exists env(HISTSIZE)] {
|
|
||||||
+ set old_histsize $env(HISTSIZE)
|
|
||||||
+}
|
|
||||||
+ set env(GDBHISTFILE) "${srcdir}/${subdir}/gdb_history"
|
+ set env(GDBHISTFILE) "${srcdir}/${subdir}/gdb_history"
|
||||||
+ set env(HISTSIZE) "10"
|
+ set env(HISTSIZE) "10"
|
||||||
+
|
+
|
||||||
|
@ -110,27 +112,8 @@ diff -N ./gdb/testsuite/gdb.base/readline-overflow.exp
|
||||||
+ gdb_clear_suppressed
|
+ gdb_clear_suppressed
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+gdb_test "\r" \
|
+ send_gdb "\r"
|
||||||
|
+ gdb_test "" \
|
||||||
+ "No executable file specified..*" \
|
+ "No executable file specified..*" \
|
||||||
+ "All the characters transferred"
|
+ "All the characters transferred"
|
||||||
+
|
|
||||||
+
|
|
||||||
+# Restore globals modified in this test...
|
|
||||||
+if [info exists old_inputrc] {
|
|
||||||
+ set env(INPUTRC) $old_inputrc
|
|
||||||
+} else {
|
|
||||||
+ unset env(INPUTRC)
|
|
||||||
+}
|
+}
|
||||||
+if [info exists old_gdbhistfile] {
|
|
||||||
+ set env(GDBHISTFILE) $old_gdbhistfile
|
|
||||||
+} else {
|
|
||||||
+ unset env(GDBHISTFILE)
|
|
||||||
+}
|
|
||||||
+if [info exists old_histsize] {
|
|
||||||
+ set env(HISTSIZE) $old_histsize
|
|
||||||
+} else {
|
|
||||||
+ unset env(HISTSIZE)
|
|
||||||
+}
|
|
||||||
+set timeout $oldtimeout1
|
|
||||||
+
|
|
||||||
+return 0
|
|
||||||
|
|
|
@ -1,165 +0,0 @@
|
||||||
Fix Valgrind paste of >= 256 * (screen width) characters (as 130001).
|
|
||||||
|
|
||||||
Invalid write of size 4
|
|
||||||
at 0x8203BD9: rl_redisplay (display.c:812)
|
|
||||||
by 0x81F5130: _rl_internal_char_cleanup (readline.c:427)
|
|
||||||
by 0x81F52B3: readline_internal_char (readline.c:508)
|
|
||||||
by 0x8209817: rl_callback_read_char (callback.c:184)
|
|
||||||
by 0x8135312: rl_callback_read_char_wrapper (event-top.c:179)
|
|
||||||
by 0x8135B7B: stdin_event_handler (event-top.c:432)
|
|
||||||
by 0x81349F2: handle_file_event (event-loop.c:730)
|
|
||||||
by 0x81342AB: process_event (event-loop.c:343)
|
|
||||||
by 0x81342F4: gdb_do_one_event (event-loop.c:380)
|
|
||||||
by 0x81313AC: catch_errors (exceptions.c:515)
|
|
||||||
by 0x80CE8CA: tui_command_loop (tui-interp.c:151)
|
|
||||||
by 0x81318B9: current_interp_command_loop (interps.c:278)
|
|
||||||
Address 0x43DCEB8 is 0 bytes after a block of size 1,024 alloc'd
|
|
||||||
at 0x4005400: malloc (vg_replace_malloc.c:149)
|
|
||||||
by 0x8087084: xmalloc (utils.c:959)
|
|
||||||
by 0x8202CA7: init_line_structures (display.c:440)
|
|
||||||
by 0x8202D14: rl_redisplay (display.c:471)
|
|
||||||
by 0x81F4F53: readline_internal_setup (readline.c:363)
|
|
||||||
by 0x820958C: _rl_callback_newline (callback.c:89)
|
|
||||||
by 0x82095BB: rl_callback_handler_install (callback.c:101)
|
|
||||||
by 0x80CE896: tui_command_loop (tui-interp.c:138)
|
|
||||||
by 0x81318B9: current_interp_command_loop (interps.c:278)
|
|
||||||
by 0x807E69A: captured_command_loop (main.c:101)
|
|
||||||
by 0x81313AC: catch_errors (exceptions.c:515)
|
|
||||||
by 0x807F55A: captured_main (main.c:826)
|
|
||||||
|
|
||||||
|
|
||||||
2006-11-08 Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
||||||
|
|
||||||
* readline/display.c (line_state, line_state_array, line_state_visible,
|
|
||||||
line_state_invisible): Encapsulate _rl_wrapped_line, inv_lbreaks,
|
|
||||||
inv_lbsize, vis_lbreaks, vis_lbsize, visible_line, invisible_line.
|
|
||||||
(init_line_structures): Initialize both _rl_wrapped_line ones now.
|
|
||||||
(rl_redisplay): Fix _rl_wrapped_line handling by using its own size.
|
|
||||||
Swap whole `line_state_visible' / `line_state_invisible' structures.
|
|
||||||
(update_line): Update for new `_rl_wrapped_line'.
|
|
||||||
|
|
||||||
|
|
||||||
Index: ./readline/display.c
|
|
||||||
===================================================================
|
|
||||||
--- ./readline/display.c 5 May 2006 18:26:12 -0000 1.11
|
|
||||||
+++ ./readline/display.c 8 Nov 2006 18:23:33 -0000
|
|
||||||
@@ -73,15 +73,31 @@ static void delete_chars PARAMS((int));
|
|
||||||
static void insert_some_chars PARAMS((char *, int, int));
|
|
||||||
static void cr PARAMS((void));
|
|
||||||
|
|
||||||
+struct line_state
|
|
||||||
+ {
|
|
||||||
+ char *line;
|
|
||||||
+ int *lbreaks;
|
|
||||||
+ int lbreaks_size;
|
|
||||||
+#if defined (HANDLE_MULTIBYTE)
|
|
||||||
+ int *wrapped_line;
|
|
||||||
+ int wrapped_line_size;
|
|
||||||
+#endif
|
|
||||||
+ };
|
|
||||||
+static struct line_state line_state_array[2];
|
|
||||||
+static struct line_state *line_state_visible = &line_state_array[0];
|
|
||||||
+static struct line_state *line_state_invisible = &line_state_array[1];
|
|
||||||
+
|
|
||||||
#if defined (HANDLE_MULTIBYTE)
|
|
||||||
static int _rl_col_width PARAMS((const char *, int, int));
|
|
||||||
-static int *_rl_wrapped_line;
|
|
||||||
#else
|
|
||||||
# define _rl_col_width(l, s, e) (((e) <= (s)) ? 0 : (e) - (s))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
-static int *inv_lbreaks, *vis_lbreaks;
|
|
||||||
-static int inv_lbsize, vis_lbsize;
|
|
||||||
+/* FIXME: Backward compatible naming. */
|
|
||||||
+#define inv_lbreaks (line_state_invisible->lbreaks)
|
|
||||||
+#define inv_lbsize (line_state_invisible->lbreaks_size)
|
|
||||||
+#define vis_lbreaks (line_state_visible->lbreaks)
|
|
||||||
+#define vis_lbsize (line_state_visible->lbreaks_size)
|
|
||||||
|
|
||||||
/* Heuristic used to decide whether it is faster to move from CUR to NEW
|
|
||||||
by backing up or outputting a carriage return and moving forward. */
|
|
||||||
@@ -150,8 +166,9 @@ static int last_lmargin;
|
|
||||||
|
|
||||||
/* The line display buffers. One is the line currently displayed on
|
|
||||||
the screen. The other is the line about to be displayed. */
|
|
||||||
-static char *visible_line = (char *)NULL;
|
|
||||||
-static char *invisible_line = (char *)NULL;
|
|
||||||
+/* FIXME: Backward compatible naming. */
|
|
||||||
+#define visible_line (line_state_visible->line)
|
|
||||||
+#define invisible_line (line_state_invisible->line)
|
|
||||||
|
|
||||||
/* A buffer for `modeline' messages. */
|
|
||||||
static char msg_buf[128];
|
|
||||||
@@ -437,7 +454,10 @@ init_line_structures (minsize)
|
|
||||||
inv_lbreaks = (int *)xmalloc (inv_lbsize * sizeof (int));
|
|
||||||
vis_lbreaks = (int *)xmalloc (vis_lbsize * sizeof (int));
|
|
||||||
#if defined (HANDLE_MULTIBYTE)
|
|
||||||
- _rl_wrapped_line = (int *)xmalloc (vis_lbsize * sizeof (int));
|
|
||||||
+ line_state_visible->wrapped_line_size = vis_lbsize;
|
|
||||||
+ line_state_visible->wrapped_line = (int *)xmalloc (line_state_visible->wrapped_line_size * sizeof (int));
|
|
||||||
+ line_state_invisible->wrapped_line_size = inv_lbsize;
|
|
||||||
+ line_state_invisible->wrapped_line = (int *)xmalloc (line_state_invisible->wrapped_line_size * sizeof (int));
|
|
||||||
#endif
|
|
||||||
inv_lbreaks[0] = vis_lbreaks[0] = 0;
|
|
||||||
}
|
|
||||||
@@ -572,10 +592,15 @@ rl_redisplay ()
|
|
||||||
{ \
|
|
||||||
inv_lbsize *= 2; \
|
|
||||||
inv_lbreaks = (int *)xrealloc (inv_lbreaks, inv_lbsize * sizeof (int)); \
|
|
||||||
- _rl_wrapped_line = (int *)xrealloc (_rl_wrapped_line, inv_lbsize * sizeof (int)); \
|
|
||||||
} \
|
|
||||||
inv_lbreaks[++newlines] = out; \
|
|
||||||
- _rl_wrapped_line[newlines] = _rl_wrapped_multicolumn; \
|
|
||||||
+ if (newlines >= (line_state_invisible->wrapped_line_size - 1)) \
|
|
||||||
+ { \
|
|
||||||
+ line_state_invisible->wrapped_line_size *= 2; \
|
|
||||||
+ line_state_invisible->wrapped_line = (int *)xrealloc (line_state_invisible->wrapped_line, \
|
|
||||||
+ line_state_invisible->wrapped_line_size * sizeof (int)); \
|
|
||||||
+ } \
|
|
||||||
+ line_state_invisible->wrapped_line[newlines] = _rl_wrapped_multicolumn; \
|
|
||||||
lpos = 0; \
|
|
||||||
} \
|
|
||||||
} while (0)
|
|
||||||
@@ -605,7 +630,7 @@ rl_redisplay ()
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined (HANDLE_MULTIBYTE)
|
|
||||||
- memset (_rl_wrapped_line, 0, vis_lbsize);
|
|
||||||
+ memset (line_state_invisible->wrapped_line, 0, line_state_invisible->wrapped_line_size * sizeof (int));
|
|
||||||
num = 0;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
@@ -1118,17 +1143,10 @@ rl_redisplay ()
|
|
||||||
|
|
||||||
/* Swap visible and non-visible lines. */
|
|
||||||
{
|
|
||||||
- char *vtemp = visible_line;
|
|
||||||
- int *itemp = vis_lbreaks, ntemp = vis_lbsize;
|
|
||||||
-
|
|
||||||
- visible_line = invisible_line;
|
|
||||||
- invisible_line = vtemp;
|
|
||||||
-
|
|
||||||
- vis_lbreaks = inv_lbreaks;
|
|
||||||
- inv_lbreaks = itemp;
|
|
||||||
-
|
|
||||||
- vis_lbsize = inv_lbsize;
|
|
||||||
- inv_lbsize = ntemp;
|
|
||||||
+ struct line_state *line_state_temp = line_state_visible;
|
|
||||||
+
|
|
||||||
+ line_state_visible = line_state_invisible;
|
|
||||||
+ line_state_invisible = line_state_temp;
|
|
||||||
|
|
||||||
rl_display_fixed = 0;
|
|
||||||
/* If we are displaying on a single line, and last_lmargin is > 0, we
|
|
||||||
@@ -1194,8 +1212,9 @@ update_line (old, new, current_line, oma
|
|
||||||
/* This fixes only double-column characters, but if the wrapped
|
|
||||||
character comsumes more than three columns, spaces will be
|
|
||||||
inserted in the string buffer. */
|
|
||||||
- if (_rl_wrapped_line[current_line] > 0)
|
|
||||||
- _rl_clear_to_eol (_rl_wrapped_line[current_line]);
|
|
||||||
+ if (current_line < line_state_visible->wrapped_line_size
|
|
||||||
+ && line_state_visible->wrapped_line[current_line] > 0)
|
|
||||||
+ _rl_clear_to_eol (line_state_visible->wrapped_line[current_line]);
|
|
||||||
|
|
||||||
memset (&ps, 0, sizeof (mbstate_t));
|
|
||||||
ret = mbrtowc (&wc, new, MB_CUR_MAX, &ps);
|
|
|
@ -1,6 +1,15 @@
|
||||||
diff -up -ruNp gdb-6.5-orig/gdb/testsuite/gdb.base/datalib-lib.c gdb-6.5/gdb/testsuite/gdb.base/datalib-lib.c
|
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||||
--- gdb-6.5-orig/gdb/testsuite/gdb.base/datalib-lib.c 1969-12-31 19:00:00.000000000 -0500
|
From: Fedora GDB patches <invalid@email.com>
|
||||||
+++ gdb-6.5/gdb/testsuite/gdb.base/datalib-lib.c 2008-05-29 13:51:50.000000000 -0400
|
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||||
|
Subject: gdb-6.5-section-num-fixup-test.patch
|
||||||
|
|
||||||
|
;; Test a crash on libraries missing the .text section.
|
||||||
|
;;=fedoratest
|
||||||
|
|
||||||
|
diff --git a/gdb/testsuite/gdb.base/datalib-lib.c b/gdb/testsuite/gdb.base/datalib-lib.c
|
||||||
|
new file mode 100644
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/gdb/testsuite/gdb.base/datalib-lib.c
|
||||||
@@ -0,0 +1,22 @@
|
@@ -0,0 +1,22 @@
|
||||||
+/* This testcase is part of GDB, the GNU debugger.
|
+/* This testcase is part of GDB, the GNU debugger.
|
||||||
+
|
+
|
||||||
|
@ -24,9 +33,10 @@ diff -up -ruNp gdb-6.5-orig/gdb/testsuite/gdb.base/datalib-lib.c gdb-6.5/gdb/tes
|
||||||
+ bug-gdb@prep.ai.mit.edu */
|
+ bug-gdb@prep.ai.mit.edu */
|
||||||
+
|
+
|
||||||
+int var;
|
+int var;
|
||||||
diff -up -ruNp gdb-6.5-orig/gdb/testsuite/gdb.base/datalib-main.c gdb-6.5/gdb/testsuite/gdb.base/datalib-main.c
|
diff --git a/gdb/testsuite/gdb.base/datalib-main.c b/gdb/testsuite/gdb.base/datalib-main.c
|
||||||
--- gdb-6.5-orig/gdb/testsuite/gdb.base/datalib-main.c 1969-12-31 19:00:00.000000000 -0500
|
new file mode 100644
|
||||||
+++ gdb-6.5/gdb/testsuite/gdb.base/datalib-main.c 2008-05-29 13:51:39.000000000 -0400
|
--- /dev/null
|
||||||
|
+++ b/gdb/testsuite/gdb.base/datalib-main.c
|
||||||
@@ -0,0 +1,26 @@
|
@@ -0,0 +1,26 @@
|
||||||
+/* This testcase is part of GDB, the GNU debugger.
|
+/* This testcase is part of GDB, the GNU debugger.
|
||||||
+
|
+
|
||||||
|
@ -54,9 +64,10 @@ diff -up -ruNp gdb-6.5-orig/gdb/testsuite/gdb.base/datalib-main.c gdb-6.5/gdb/te
|
||||||
+{
|
+{
|
||||||
+ return 0;
|
+ return 0;
|
||||||
+}
|
+}
|
||||||
diff -up -ruNp gdb-6.5-orig/gdb/testsuite/gdb.base/datalib.exp gdb-6.5/gdb/testsuite/gdb.base/datalib.exp
|
diff --git a/gdb/testsuite/gdb.base/datalib.exp b/gdb/testsuite/gdb.base/datalib.exp
|
||||||
--- gdb-6.5-orig/gdb/testsuite/gdb.base/datalib.exp 1969-12-31 19:00:00.000000000 -0500
|
new file mode 100644
|
||||||
+++ gdb-6.5/gdb/testsuite/gdb.base/datalib.exp 2008-05-29 14:58:33.000000000 -0400
|
--- /dev/null
|
||||||
|
+++ b/gdb/testsuite/gdb.base/datalib.exp
|
||||||
@@ -0,0 +1,51 @@
|
@@ -0,0 +1,51 @@
|
||||||
+# Copyright 2008 Free Software Foundation, Inc.
|
+# Copyright 2008 Free Software Foundation, Inc.
|
||||||
+
|
+
|
||||||
|
@ -77,8 +88,8 @@ diff -up -ruNp gdb-6.5-orig/gdb/testsuite/gdb.base/datalib.exp gdb-6.5/gdb/tests
|
||||||
+set testfile datalib
|
+set testfile datalib
|
||||||
+set srcfilemain ${testfile}-main.c
|
+set srcfilemain ${testfile}-main.c
|
||||||
+set srcfilelib ${testfile}-lib.c
|
+set srcfilelib ${testfile}-lib.c
|
||||||
+set libfile ${objdir}/${subdir}/${testfile}-lib.so
|
+set libfile [standard_output_file ${testfile}-lib.so]
|
||||||
+set binfile ${objdir}/${subdir}/${testfile}-main
|
+set binfile [standard_output_file ${testfile}-main]
|
||||||
+if { [gdb_compile "${srcdir}/${subdir}/${srcfilelib}" "${libfile}" executable [list debug {additional_flags=-shared -nostdlib}]] != "" } {
|
+if { [gdb_compile "${srcdir}/${subdir}/${srcfilelib}" "${libfile}" executable [list debug {additional_flags=-shared -nostdlib}]] != "" } {
|
||||||
+ untested "Couldn't compile test program"
|
+ untested "Couldn't compile test program"
|
||||||
+ return -1
|
+ return -1
|
||||||
|
|
|
@ -1,12 +1,21 @@
|
||||||
|
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||||
|
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||||
|
Subject: gdb-6.5-sharedlibrary-path.patch
|
||||||
|
|
||||||
|
;; Fix TLS symbols resolving for shared libraries with a relative pathname.
|
||||||
|
;; The testsuite needs `gdb-6.5-tls-of-separate-debuginfo.patch'.
|
||||||
|
;;=fedoratest: One should recheck if it is really fixed upstream.
|
||||||
|
|
||||||
If you provided some relative path to the shared library, such as with
|
If you provided some relative path to the shared library, such as with
|
||||||
export LD_LIBRARY_PATH=.
|
export LD_LIBRARY_PATH=.
|
||||||
then gdb would fail to match the shared library name during the TLS lookup.
|
then gdb would fail to match the shared library name during the TLS lookup.
|
||||||
|
|
||||||
|
Dropped the workaround/fix for gdb-6.8.50.20081128 - is it still needed?
|
||||||
|
|
||||||
The testsuite needs `gdb-6.3-bz146810-solib_absolute_prefix_is_empty.patch'.
|
The testsuite needs `gdb-6.3-bz146810-solib_absolute_prefix_is_empty.patch'.
|
||||||
The testsuite needs `gdb-6.5-tls-of-separate-debuginfo.patch'.
|
The testsuite needs `gdb-6.5-tls-of-separate-debuginfo.patch'.
|
||||||
|
|
||||||
|
|
||||||
2006-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
|
2006-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||||
|
|
||||||
* solib-svr4.c (svr4_fetch_objfile_link_map): Match even absolute
|
* solib-svr4.c (svr4_fetch_objfile_link_map): Match even absolute
|
||||||
|
@ -20,61 +29,10 @@ The testsuite needs `gdb-6.5-tls-of-separate-debuginfo.patch'.
|
||||||
|
|
||||||
Port to gdb-6.7.50.20080227.
|
Port to gdb-6.7.50.20080227.
|
||||||
|
|
||||||
Index: gdb-6.7.50.20080227/gdb/solib-svr4.c
|
diff --git a/gdb/testsuite/gdb.threads/tls-sepdebug-main.c b/gdb/testsuite/gdb.threads/tls-sepdebug-main.c
|
||||||
===================================================================
|
new file mode 100644
|
||||||
--- gdb-6.7.50.20080227.orig/gdb/solib-svr4.c 2008-02-27 08:59:06.000000000 +0100
|
--- /dev/null
|
||||||
+++ gdb-6.7.50.20080227/gdb/solib-svr4.c 2008-02-27 09:00:44.000000000 +0100
|
+++ b/gdb/testsuite/gdb.threads/tls-sepdebug-main.c
|
||||||
@@ -1017,10 +1017,14 @@ CORE_ADDR
|
|
||||||
svr4_fetch_objfile_link_map (struct objfile *objfile)
|
|
||||||
{
|
|
||||||
CORE_ADDR lm;
|
|
||||||
+ int resolve;
|
|
||||||
|
|
||||||
if (locate_base () == 0)
|
|
||||||
return 0; /* failed somehow... */
|
|
||||||
|
|
||||||
+for (resolve = 0; resolve <= 1; resolve++)
|
|
||||||
+{
|
|
||||||
+
|
|
||||||
/* Position ourselves on the first link map. */
|
|
||||||
lm = solib_svr4_r_map ();
|
|
||||||
while (lm)
|
|
||||||
@@ -1059,6 +1063,21 @@ svr4_fetch_objfile_link_map (struct objf
|
|
||||||
safe_strerror (errcode));
|
|
||||||
else
|
|
||||||
{
|
|
||||||
+ /* solib_svr4_r_map() may contain relative pathnames while
|
|
||||||
+ `objfile->name' is absolute. */
|
|
||||||
+ if (resolve && buffer && buffer[0] != '/')
|
|
||||||
+ {
|
|
||||||
+ char *absolute;
|
|
||||||
+ int fd;
|
|
||||||
+
|
|
||||||
+ fd = solib_open (buffer, &absolute);
|
|
||||||
+ if (fd != -1)
|
|
||||||
+ {
|
|
||||||
+ make_cleanup (xfree, absolute);
|
|
||||||
+ buffer = absolute;
|
|
||||||
+ close (fd);
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
/* Is this the linkmap for the file we want? */
|
|
||||||
/* If the file is not a shared library and has no name,
|
|
||||||
we are sure it is the main executable, so we return that. */
|
|
||||||
@@ -1077,6 +1096,9 @@ svr4_fetch_objfile_link_map (struct objf
|
|
||||||
builtin_type_void_data_ptr);
|
|
||||||
do_cleanups (old_chain);
|
|
||||||
}
|
|
||||||
+
|
|
||||||
+} /* resolve */
|
|
||||||
+
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
Index: gdb-6.7.50.20080227/gdb/testsuite/gdb.threads/tls-sepdebug-main.c
|
|
||||||
===================================================================
|
|
||||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
|
||||||
+++ gdb-6.7.50.20080227/gdb/testsuite/gdb.threads/tls-sepdebug-main.c 2008-02-27 09:00:15.000000000 +0100
|
|
||||||
@@ -0,0 +1,25 @@
|
@@ -0,0 +1,25 @@
|
||||||
+/* This testcase is part of GDB, the GNU debugger.
|
+/* This testcase is part of GDB, the GNU debugger.
|
||||||
+
|
+
|
||||||
|
@ -101,10 +59,10 @@ Index: gdb-6.7.50.20080227/gdb/testsuite/gdb.threads/tls-sepdebug-main.c
|
||||||
+{
|
+{
|
||||||
+ return 0;
|
+ return 0;
|
||||||
+}
|
+}
|
||||||
Index: gdb-6.7.50.20080227/gdb/testsuite/gdb.threads/tls-sepdebug-shared.c
|
diff --git a/gdb/testsuite/gdb.threads/tls-sepdebug-shared.c b/gdb/testsuite/gdb.threads/tls-sepdebug-shared.c
|
||||||
===================================================================
|
new file mode 100644
|
||||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
--- /dev/null
|
||||||
+++ gdb-6.7.50.20080227/gdb/testsuite/gdb.threads/tls-sepdebug-shared.c 2008-02-27 09:00:15.000000000 +0100
|
+++ b/gdb/testsuite/gdb.threads/tls-sepdebug-shared.c
|
||||||
@@ -0,0 +1,22 @@
|
@@ -0,0 +1,22 @@
|
||||||
+/* This testcase is part of GDB, the GNU debugger.
|
+/* This testcase is part of GDB, the GNU debugger.
|
||||||
+
|
+
|
||||||
|
@ -128,11 +86,11 @@ Index: gdb-6.7.50.20080227/gdb/testsuite/gdb.threads/tls-sepdebug-shared.c
|
||||||
+ bug-gdb@prep.ai.mit.edu */
|
+ bug-gdb@prep.ai.mit.edu */
|
||||||
+
|
+
|
||||||
+__thread int var = 42;
|
+__thread int var = 42;
|
||||||
Index: gdb-6.7.50.20080227/gdb/testsuite/gdb.threads/tls-sepdebug.exp
|
diff --git a/gdb/testsuite/gdb.threads/tls-sepdebug.exp b/gdb/testsuite/gdb.threads/tls-sepdebug.exp
|
||||||
===================================================================
|
new file mode 100644
|
||||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
--- /dev/null
|
||||||
+++ gdb-6.7.50.20080227/gdb/testsuite/gdb.threads/tls-sepdebug.exp 2008-02-27 09:00:15.000000000 +0100
|
+++ b/gdb/testsuite/gdb.threads/tls-sepdebug.exp
|
||||||
@@ -0,0 +1,81 @@
|
@@ -0,0 +1,87 @@
|
||||||
+# Copyright 2006 Free Software Foundation, Inc.
|
+# Copyright 2006 Free Software Foundation, Inc.
|
||||||
+
|
+
|
||||||
+# This program is free software; you can redistribute it and/or modify
|
+# This program is free software; you can redistribute it and/or modify
|
||||||
|
@ -157,14 +115,17 @@ Index: gdb-6.7.50.20080227/gdb/testsuite/gdb.threads/tls-sepdebug.exp
|
||||||
+set srcmainfile ${testfile}-main.c
|
+set srcmainfile ${testfile}-main.c
|
||||||
+set srcsharedfile ${testfile}-shared.c
|
+set srcsharedfile ${testfile}-shared.c
|
||||||
+
|
+
|
||||||
+# DO NOT use ${objdir} obsolute reference here as we test relative directories
|
+set binmainfile [standard_output_file ${testfile}-main]
|
||||||
+# below and the absolute pathnames must not get encoded to the binaries.
|
+set binsharedbase ${testfile}-shared.so
|
||||||
|
+set binsharedfile [standard_output_file ${binsharedbase}]
|
||||||
|
+set binshareddebugfile [standard_output_file ${binsharedbase}.debug]
|
||||||
+
|
+
|
||||||
+set binmainfile ${testfile}-main
|
+# Use explicit -soname as otherwise the full path to the library would get
|
||||||
+set binsharedfile ${testfile}-shared.so
|
+# encoded into ${binmainfile} making LD_LIBRARY_PATH tests useless.
|
||||||
+set binshareddebugfile ${testfile}-shared.so.debug
|
|
||||||
+
|
+
|
||||||
+if { [gdb_compile_shlib "${srcdir}/${subdir}/${srcsharedfile}" "${binsharedfile}" {debug}] != "" } {
|
+# FIXME: gcc dependency (-Wl,-soname).
|
||||||
|
+
|
||||||
|
+if { [gdb_compile_shlib "${srcdir}/${subdir}/${srcsharedfile}" "${binsharedfile}" [list debug additional_flags=-Wl,-soname=${binsharedbase}]] != "" } {
|
||||||
+ untested "Couldn't compile test library"
|
+ untested "Couldn't compile test library"
|
||||||
+ return -1
|
+ return -1
|
||||||
+}
|
+}
|
||||||
|
@ -178,7 +139,9 @@ Index: gdb-6.7.50.20080227/gdb/testsuite/gdb.threads/tls-sepdebug.exp
|
||||||
+ remote_exec build "objcopy --add-gnu-debuglink=${binshareddebugfile} ${binsharedfile}"
|
+ remote_exec build "objcopy --add-gnu-debuglink=${binshareddebugfile} ${binsharedfile}"
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
+if { [gdb_compile_pthreads "${srcdir}/${subdir}/${srcmainfile}" "${binmainfile}" executable [list debug shlib=${binsharedfile}]] != "" } {
|
+# Do not use `shlib=' as it will automatically add also -rpath for gcc.
|
||||||
|
+
|
||||||
|
+if { [gdb_compile_pthreads "${srcdir}/${subdir}/${srcmainfile} ${binsharedfile}" "${binmainfile}" executable {debug}] != "" } {
|
||||||
+ untested "Couldn't compile test program"
|
+ untested "Couldn't compile test program"
|
||||||
+ return -1
|
+ return -1
|
||||||
+}
|
+}
|
||||||
|
@ -189,7 +152,8 @@ Index: gdb-6.7.50.20080227/gdb/testsuite/gdb.threads/tls-sepdebug.exp
|
||||||
+# \$PWD is easy - it is the absolute way
|
+# \$PWD is easy - it is the absolute way
|
||||||
+# ${subdir} would fail on "print var"
|
+# ${subdir} would fail on "print var"
|
||||||
+
|
+
|
||||||
+foreach ld_library_path { \$PWD ${subdir} } name { absolute relative } {
|
+set absdir [file dirname [standard_output_file ${binsharedbase}]]
|
||||||
|
+foreach ld_library_path [list $absdir [relative_filename [pwd] $absdir]] name { absolute relative } {
|
||||||
+
|
+
|
||||||
+ gdb_exit
|
+ gdb_exit
|
||||||
+ gdb_start
|
+ gdb_start
|
||||||
|
|
|
@ -1,24 +0,0 @@
|
||||||
Dependency on: gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch
|
|
||||||
|
|
||||||
|
|
||||||
2006-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
||||||
|
|
||||||
* target.c (target_translate_tls_address): Fix for separate debuginfo.
|
|
||||||
|
|
||||||
|
|
||||||
diff -rup gdb-6.5.orig/gdb/target.c gdb-6.5/gdb/target.c
|
|
||||||
--- gdb-6.5.orig/gdb/target.c 2006-09-20 17:13:35.000000000 -0400
|
|
||||||
+++ gdb-6.5/gdb/target.c 2006-09-20 17:15:53.000000000 -0400
|
|
||||||
@@ -769,6 +769,12 @@ target_translate_tls_address (struct obj
|
|
||||||
ptid_t ptid = inferior_ptid;
|
|
||||||
volatile struct gdb_exception ex;
|
|
||||||
|
|
||||||
+ /* Resolve: Cannot find shared library
|
|
||||||
+ `/usr/lib/debug/lib/lib....so.debug' in dynamic linker's load
|
|
||||||
+ module list */
|
|
||||||
+ if (objfile->separate_debug_objfile_backlink != NULL)
|
|
||||||
+ objfile = objfile->separate_debug_objfile_backlink;
|
|
||||||
+
|
|
||||||
TRY_CATCH (ex, RETURN_MASK_ALL)
|
|
||||||
{
|
|
||||||
CORE_ADDR lm_addr;
|
|
|
@ -0,0 +1,196 @@
|
||||||
|
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||||
|
From: Fedora GDB patches <invalid@email.com>
|
||||||
|
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||||
|
Subject: gdb-6.6-buildid-locate-core-as-arg.patch
|
||||||
|
|
||||||
|
;;=push+jan
|
||||||
|
|
||||||
|
http://sourceware.org/ml/gdb-patches/2010-01/msg00558.html
|
||||||
|
|
||||||
|
[ Fixed up since the mail. ]
|
||||||
|
|
||||||
|
On Thu, 21 Jan 2010 18:17:15 +0100, Doug Evans wrote:
|
||||||
|
> Not an exhaustive list, but if we go down the path of converting "gdb
|
||||||
|
> corefile" to "gdb -c corefile", then we also need to think about "file
|
||||||
|
> corefile" being converted to "core corefile" [or "target core
|
||||||
|
> corefile", "core" is apparently deprecated in favor of "target core"]
|
||||||
|
> and "target exec corefile" -> "target core corefile". Presumably
|
||||||
|
> "file corefile" (and "target exec corefile") would discard the
|
||||||
|
> currently selected executable. But maybe not. Will that be confusing
|
||||||
|
> for users? I don't know.
|
||||||
|
|
||||||
|
While thinking about it overriding some GDB _commands_ was not my intention.
|
||||||
|
|
||||||
|
There is a general assumption if I have a shell COMMAND and some FILE I can do
|
||||||
|
$ COMMAND FILE
|
||||||
|
and COMMAND will appropriately load the FILE.
|
||||||
|
|
||||||
|
FSF GDB currently needs to specify also the executable file for core files
|
||||||
|
which already inhibits this intuitive expectation. OTOH with the build-id
|
||||||
|
locating patch which could allow such intuitive start notneeding the
|
||||||
|
executable file. Still it currently did not work due to the required "-c":
|
||||||
|
$ COMMAND -c COREFILE
|
||||||
|
|
||||||
|
Entering "file", "core-file" or "attach" commands is already explicit enough
|
||||||
|
so that it IMO should do what the command name says without any
|
||||||
|
autodetections. The second command line argument
|
||||||
|
(captured_main->pid_or_core_arg) is also autodetected (for PID or CORE) but
|
||||||
|
neither "attach" accepts a core file nor "core-file" accepts a PID.
|
||||||
|
|
||||||
|
The patch makes sense only with the build-id patchset so this is not submit
|
||||||
|
for FSF GDB inclusion yet. I am fine with your patch (+/- Hui Zhu's pending
|
||||||
|
bfd_check_format_matches) as the patch below is its natural extension.
|
||||||
|
|
||||||
|
Sorry for the delay,
|
||||||
|
Jan
|
||||||
|
|
||||||
|
2010-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||||
|
|
||||||
|
* exceptions.h (enum errors <IS_CORE_ERROR>): New.
|
||||||
|
* exec.c: Include exceptions.h.
|
||||||
|
(exec_file_attach <bfd_core>): Call throw_error (IS_CORE_ERROR, ...).
|
||||||
|
* main.c (exec_or_core_file_attach): New.
|
||||||
|
(captured_main <optind < argc>): Set also corearg.
|
||||||
|
(captured_main <strcmp (execarg, symarg) == 0>): New variable func.
|
||||||
|
Call exec_or_core_file_attach if COREARG matches EXECARG. Call
|
||||||
|
symbol_file_add_main only if CORE_BFD remained NULL.
|
||||||
|
|
||||||
|
Http://sourceware.org/ml/gdb-patches/2010-01/msg00517.html
|
||||||
|
2010-01-20 Doug Evans <dje@google.com>
|
||||||
|
|
||||||
|
* exec.c (exec_file_attach): Print a more useful error message if the
|
||||||
|
user did "gdb core".
|
||||||
|
|
||||||
|
diff --git a/gdb/exec.c b/gdb/exec.c
|
||||||
|
--- a/gdb/exec.c
|
||||||
|
+++ b/gdb/exec.c
|
||||||
|
@@ -18,6 +18,8 @@
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
|
|
||||||
|
#include "defs.h"
|
||||||
|
+#include "arch-utils.h"
|
||||||
|
+#include "exceptions.h"
|
||||||
|
#include "frame.h"
|
||||||
|
#include "inferior.h"
|
||||||
|
#include "target.h"
|
||||||
|
@@ -495,12 +497,27 @@ exec_file_attach (const char *filename, int from_tty)
|
||||||
|
|
||||||
|
if (!bfd_check_format_matches (exec_bfd, bfd_object, &matching))
|
||||||
|
{
|
||||||
|
+ int is_core;
|
||||||
|
+
|
||||||
|
+ /* If the user accidentally did "gdb core", print a useful
|
||||||
|
+ error message. Check it only after bfd_object has been checked as
|
||||||
|
+ a valid executable may get recognized for example also as
|
||||||
|
+ "trad-core". */
|
||||||
|
+ is_core = bfd_check_format (exec_bfd, bfd_core);
|
||||||
|
+
|
||||||
|
/* Make sure to close exec_bfd, or else "run" might try to use
|
||||||
|
it. */
|
||||||
|
exec_close ();
|
||||||
|
- error (_("\"%ps\": not in executable format: %s"),
|
||||||
|
- styled_string (file_name_style.style (), scratch_pathname),
|
||||||
|
- gdb_bfd_errmsg (bfd_get_error (), matching).c_str ());
|
||||||
|
+
|
||||||
|
+ if (is_core != 0)
|
||||||
|
+ throw_error (IS_CORE_ERROR,
|
||||||
|
+ _("\"%s\" is a core file.\n"
|
||||||
|
+ "Please specify an executable to debug."),
|
||||||
|
+ scratch_pathname);
|
||||||
|
+ else
|
||||||
|
+ error (_("\"%ps\": not in executable format: %s"),
|
||||||
|
+ styled_string (file_name_style.style (), scratch_pathname),
|
||||||
|
+ gdb_bfd_errmsg (bfd_get_error (), matching).c_str ());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (build_section_table (exec_bfd, §ions, §ions_end))
|
||||||
|
diff --git a/gdb/main.c b/gdb/main.c
|
||||||
|
--- a/gdb/main.c
|
||||||
|
+++ b/gdb/main.c
|
||||||
|
@@ -524,6 +524,34 @@ struct cmdarg
|
||||||
|
char *string;
|
||||||
|
};
|
||||||
|
|
||||||
|
+/* Call exec_file_attach. If it detected FILENAME is a core file call
|
||||||
|
+ core_file_command. Print the original exec_file_attach error only if
|
||||||
|
+ core_file_command failed to find a matching executable. */
|
||||||
|
+
|
||||||
|
+static void
|
||||||
|
+exec_or_core_file_attach (const char *filename, int from_tty)
|
||||||
|
+{
|
||||||
|
+ gdb_assert (exec_bfd == NULL);
|
||||||
|
+
|
||||||
|
+ try
|
||||||
|
+ {
|
||||||
|
+ exec_file_attach (filename, from_tty);
|
||||||
|
+ }
|
||||||
|
+ catch (gdb_exception_error &e)
|
||||||
|
+ {
|
||||||
|
+ if (e.error == IS_CORE_ERROR)
|
||||||
|
+ {
|
||||||
|
+ core_file_command ((char *) filename, from_tty);
|
||||||
|
+
|
||||||
|
+ /* Iff the core file found its executable suppress the error message
|
||||||
|
+ from exec_file_attach. */
|
||||||
|
+ if (exec_bfd != NULL)
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
+ throw_exception (std::move (e));
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
static void
|
||||||
|
captured_main_1 (struct captured_main_args *context)
|
||||||
|
{
|
||||||
|
@@ -959,6 +987,8 @@ captured_main_1 (struct captured_main_args *context)
|
||||||
|
{
|
||||||
|
symarg = argv[optind];
|
||||||
|
execarg = argv[optind];
|
||||||
|
+ if (optind + 1 == argc && corearg == NULL)
|
||||||
|
+ corearg = argv[optind];
|
||||||
|
optind++;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -1114,12 +1144,25 @@ captured_main_1 (struct captured_main_args *context)
|
||||||
|
&& symarg != NULL
|
||||||
|
&& strcmp (execarg, symarg) == 0)
|
||||||
|
{
|
||||||
|
+ catch_command_errors_const_ftype *func;
|
||||||
|
+
|
||||||
|
+ /* Call exec_or_core_file_attach only if the file was specified as
|
||||||
|
+ a command line argument (and not an a command line option). */
|
||||||
|
+ if (corearg != NULL && strcmp (corearg, execarg) == 0)
|
||||||
|
+ {
|
||||||
|
+ func = exec_or_core_file_attach;
|
||||||
|
+ corearg = NULL;
|
||||||
|
+ }
|
||||||
|
+ else
|
||||||
|
+ func = exec_file_attach;
|
||||||
|
+
|
||||||
|
/* The exec file and the symbol-file are the same. If we can't
|
||||||
|
open it, better only print one error message.
|
||||||
|
- catch_command_errors returns non-zero on success! */
|
||||||
|
- ret = catch_command_errors (exec_file_attach, execarg,
|
||||||
|
- !batch_flag);
|
||||||
|
- if (ret != 0)
|
||||||
|
+ catch_command_errors returns non-zero on success!
|
||||||
|
+ Do not load EXECARG as a symbol file if it has been already processed
|
||||||
|
+ as a core file. */
|
||||||
|
+ ret = catch_command_errors (func, execarg, !batch_flag);
|
||||||
|
+ if (ret != 0 && core_bfd == NULL)
|
||||||
|
ret = catch_command_errors (symbol_file_add_main_adapter,
|
||||||
|
symarg, !batch_flag);
|
||||||
|
}
|
||||||
|
diff --git a/gdbsupport/common-exceptions.h b/gdbsupport/common-exceptions.h
|
||||||
|
--- a/gdbsupport/common-exceptions.h
|
||||||
|
+++ b/gdbsupport/common-exceptions.h
|
||||||
|
@@ -106,6 +106,9 @@ enum errors {
|
||||||
|
"_ERROR" is appended to the name. */
|
||||||
|
MAX_COMPLETIONS_REACHED_ERROR,
|
||||||
|
|
||||||
|
+ /* Attempt to load a core file as executable. */
|
||||||
|
+ IS_CORE_ERROR,
|
||||||
|
+
|
||||||
|
/* Add more errors here. */
|
||||||
|
NR_ERRORS
|
||||||
|
};
|
|
@ -0,0 +1,129 @@
|
||||||
|
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||||
|
From: Fedora GDB patches <invalid@email.com>
|
||||||
|
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||||
|
Subject:
|
||||||
|
gdb-6.6-buildid-locate-misleading-warning-missing-debuginfo-rhbz981154.patch
|
||||||
|
|
||||||
|
;; Fix 'gdb gives highly misleading error when debuginfo pkg is present,
|
||||||
|
;; but not corresponding binary pkg' (RH BZ 981154).
|
||||||
|
;;=push+jan
|
||||||
|
|
||||||
|
Comments by Sergio Durigan Junior <sergiodj@redhat.com>:
|
||||||
|
|
||||||
|
This is the fix for RH BZ #981154
|
||||||
|
|
||||||
|
It is mainly a testcase addition, but a minor fix in the gdb/build-id.c
|
||||||
|
file was also needed.
|
||||||
|
|
||||||
|
gdb/build-id.c was added by:
|
||||||
|
|
||||||
|
commit dc294be54c96414035eed7d53dafdea0a6f31a72
|
||||||
|
Author: Tom Tromey <tromey@redhat.com>
|
||||||
|
Date: Tue Oct 8 19:56:15 2013 +0000
|
||||||
|
|
||||||
|
and had a little thinko there. The variable 'filename' needs to be set to
|
||||||
|
NULL after it is free'd, otherwise the code below thinks that it is still
|
||||||
|
valid and doesn't print the necessary warning ("Try: yum install ...").
|
||||||
|
|
||||||
|
diff --git a/gdb/testsuite/gdb.base/rhbz981154-misleading-yum-install-warning.exp b/gdb/testsuite/gdb.base/rhbz981154-misleading-yum-install-warning.exp
|
||||||
|
new file mode 100644
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/gdb/testsuite/gdb.base/rhbz981154-misleading-yum-install-warning.exp
|
||||||
|
@@ -0,0 +1,97 @@
|
||||||
|
+# Copyright (C) 2014 Free Software Foundation, Inc.
|
||||||
|
+
|
||||||
|
+# This program is free software; you can redistribute it and/or modify
|
||||||
|
+# it under the terms of the GNU General Public License as published by
|
||||||
|
+# the Free Software Foundation; either version 3 of the License, or
|
||||||
|
+# (at your option) any later version.
|
||||||
|
+#
|
||||||
|
+# This program is distributed in the hope that it will be useful,
|
||||||
|
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
+# GNU General Public License for more details.
|
||||||
|
+#
|
||||||
|
+# You should have received a copy of the GNU General Public License
|
||||||
|
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
+
|
||||||
|
+standard_testfile "normal.c"
|
||||||
|
+
|
||||||
|
+if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
|
||||||
|
+ return -1
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+# Get the build-id of the file
|
||||||
|
+set build_id_debug_file [build_id_debug_filename_get $binfile]
|
||||||
|
+regsub -all ".debug$" $build_id_debug_file "" build_id_without_debug
|
||||||
|
+
|
||||||
|
+# Run to main
|
||||||
|
+if { ![runto_main] } {
|
||||||
|
+ return -1
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+# We first need to generate a corefile
|
||||||
|
+set escapedfilename [string_to_regexp [standard_output_file gcore.test]]
|
||||||
|
+set core_supported 0
|
||||||
|
+gdb_test_multiple "gcore [standard_output_file gcore.test]" \
|
||||||
|
+ "save a corefile" \
|
||||||
|
+{
|
||||||
|
+ -re "Saved corefile ${escapedfilename}\[\r\n\]+$gdb_prompt $" {
|
||||||
|
+ pass "save a corefile"
|
||||||
|
+ global core_supported
|
||||||
|
+ set core_supported 1
|
||||||
|
+ }
|
||||||
|
+ -re "Can't create a corefile\[\r\n\]+$gdb_prompt $" {
|
||||||
|
+ unsupported "save a corefile"
|
||||||
|
+ global core_supported
|
||||||
|
+ set core_supported 0
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+if {!$core_supported} {
|
||||||
|
+ return -1
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+# Move the binfile to a temporary name
|
||||||
|
+remote_exec build "mv $binfile ${binfile}.old"
|
||||||
|
+
|
||||||
|
+# Reinitialize GDB and see if we get a yum/dnf warning
|
||||||
|
+gdb_exit
|
||||||
|
+gdb_start
|
||||||
|
+gdb_reinitialize_dir $srcdir/$subdir
|
||||||
|
+
|
||||||
|
+with_test_prefix "first run:" {
|
||||||
|
+ gdb_test "set build-id-verbose 1" "" \
|
||||||
|
+ "set build-id-verbose"
|
||||||
|
+
|
||||||
|
+ gdb_test "set debug-file-directory [file dirname [standard_output_file gcore.test]]" "" \
|
||||||
|
+ "set debug-file-directory"
|
||||||
|
+
|
||||||
|
+ gdb_test "core-file [standard_output_file gcore.test]" \
|
||||||
|
+ "Missing separate debuginfo for the main executable file\r\nTry: (yum|dnf) --enablerepo='\\*debug\\*' install [standard_output_file $build_id_without_debug]\r\n.*" \
|
||||||
|
+ "test first yum/dnf warning"
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+# Now we define and create our .build-id
|
||||||
|
+file mkdir [file dirname [standard_output_file ${build_id_without_debug}]]
|
||||||
|
+# Cannot use "file link" (from TCL) because it requires the target file to
|
||||||
|
+# exist.
|
||||||
|
+remote_exec build "ln -s $binfile [standard_output_file ${build_id_without_debug}]"
|
||||||
|
+
|
||||||
|
+# Reinitialize GDB to get the second yum/dnf warning
|
||||||
|
+gdb_exit
|
||||||
|
+gdb_start
|
||||||
|
+gdb_reinitialize_dir $srcdir/$subdir
|
||||||
|
+
|
||||||
|
+with_test_prefix "second run:" {
|
||||||
|
+ gdb_test "set build-id-verbose 1" "" \
|
||||||
|
+ "set build-id-verbose"
|
||||||
|
+
|
||||||
|
+ gdb_test "set debug-file-directory [file dirname [standard_output_file gcore.test]]" "" \
|
||||||
|
+ "set debug-file-directory"
|
||||||
|
+
|
||||||
|
+ gdb_test "core-file [standard_output_file gcore.test]" \
|
||||||
|
+ "Missing separate debuginfo for the main executable file\r\nTry: (yum|dnf) --enablerepo='\\*debug\\*' install $binfile\r\n.*" \
|
||||||
|
+ "test second yum/dnf warning"
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+# Leaving the link there will cause breakage in the next run.
|
||||||
|
+remote_exec build "rm -f [standard_output_file ${build_id_without_debug}]"
|
|
@ -0,0 +1,42 @@
|
||||||
|
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||||
|
From: Fedora GDB patches <invalid@email.com>
|
||||||
|
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||||
|
Subject: gdb-6.6-buildid-locate-rpm-librpm-workaround.patch
|
||||||
|
|
||||||
|
;; Workaround librpm BZ 643031 due to its unexpected exit() calls (BZ 642879).
|
||||||
|
;;=push+jan
|
||||||
|
|
||||||
|
diff --git a/gdb/build-id.c b/gdb/build-id.c
|
||||||
|
--- a/gdb/build-id.c
|
||||||
|
+++ b/gdb/build-id.c
|
||||||
|
@@ -708,6 +708,19 @@ build_id_to_filename (const struct bfd_build_id *build_id, char **link_return)
|
||||||
|
#include <dlfcn.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
+/* Workarodun https://bugzilla.redhat.com/show_bug.cgi?id=643031
|
||||||
|
+ librpm must not exit() an application on SIGINT
|
||||||
|
+
|
||||||
|
+ Enable or disable a signal handler. SIGNUM: signal to enable (or disable
|
||||||
|
+ if negative). HANDLER: sa_sigaction handler (or NULL to use
|
||||||
|
+ rpmsqHandler()). Returns: no. of refs, -1 on error. */
|
||||||
|
+extern int rpmsqEnable (int signum, /* rpmsqAction_t handler */ void *handler);
|
||||||
|
+int
|
||||||
|
+rpmsqEnable (int signum, /* rpmsqAction_t handler */ void *handler)
|
||||||
|
+{
|
||||||
|
+ return 0;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
/* This MISSING_RPM_HASH tracker is used to collect all the missing rpm files
|
||||||
|
and avoid their duplicities during a single inferior run. */
|
||||||
|
|
||||||
|
diff --git a/gdb/proc-service.list b/gdb/proc-service.list
|
||||||
|
--- a/gdb/proc-service.list
|
||||||
|
+++ b/gdb/proc-service.list
|
||||||
|
@@ -37,4 +37,7 @@
|
||||||
|
ps_pstop;
|
||||||
|
ps_ptread;
|
||||||
|
ps_ptwrite;
|
||||||
|
+
|
||||||
|
+ /* gdb-6.6-buildid-locate-rpm.patch */
|
||||||
|
+ rpmsqEnable;
|
||||||
|
};
|
|
@ -0,0 +1,128 @@
|
||||||
|
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||||
|
From: Fedora GDB patches <invalid@email.com>
|
||||||
|
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||||
|
Subject: gdb-6.6-buildid-locate-rpm-scl.patch
|
||||||
|
|
||||||
|
;; [SCL] Skip deprecated .gdb_index warning for Red Hat built files (BZ 953585).
|
||||||
|
;;=push+jan
|
||||||
|
|
||||||
|
warning: Skipping deprecated .gdb_index section
|
||||||
|
https://bugzilla.redhat.com/show_bug.cgi?id=953585
|
||||||
|
|
||||||
|
diff --git a/gdb/build-id.c b/gdb/build-id.c
|
||||||
|
--- a/gdb/build-id.c
|
||||||
|
+++ b/gdb/build-id.c
|
||||||
|
@@ -742,7 +742,11 @@ static int missing_rpm_list_entries;
|
||||||
|
/* Returns the count of newly added rpms. */
|
||||||
|
|
||||||
|
static int
|
||||||
|
+#ifndef GDB_INDEX_VERIFY_VENDOR
|
||||||
|
missing_rpm_enlist (const char *filename)
|
||||||
|
+#else
|
||||||
|
+missing_rpm_enlist_1 (const char *filename, int verify_vendor)
|
||||||
|
+#endif
|
||||||
|
{
|
||||||
|
static int rpm_init_done = 0;
|
||||||
|
rpmts ts;
|
||||||
|
@@ -849,7 +853,11 @@ missing_rpm_enlist (const char *filename)
|
||||||
|
mi = rpmtsInitIterator_p (ts, RPMTAG_BASENAMES, filename, 0);
|
||||||
|
if (mi != NULL)
|
||||||
|
{
|
||||||
|
+#ifndef GDB_INDEX_VERIFY_VENDOR
|
||||||
|
for (;;)
|
||||||
|
+#else
|
||||||
|
+ if (!verify_vendor) for (;;)
|
||||||
|
+#endif
|
||||||
|
{
|
||||||
|
Header h;
|
||||||
|
char *debuginfo, **slot, *s, *s2;
|
||||||
|
@@ -967,6 +975,37 @@ missing_rpm_enlist (const char *filename)
|
||||||
|
xfree (debuginfo);
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
+#ifdef GDB_INDEX_VERIFY_VENDOR
|
||||||
|
+ else /* verify_vendor */
|
||||||
|
+ {
|
||||||
|
+ int vendor_pass = 0, vendor_fail = 0;
|
||||||
|
+
|
||||||
|
+ for (;;)
|
||||||
|
+ {
|
||||||
|
+ Header h;
|
||||||
|
+ errmsg_t err;
|
||||||
|
+ char *vendor;
|
||||||
|
+
|
||||||
|
+ h = rpmdbNextIterator_p (mi);
|
||||||
|
+ if (h == NULL)
|
||||||
|
+ break;
|
||||||
|
+
|
||||||
|
+ vendor = headerFormat_p (h, "%{vendor}", &err);
|
||||||
|
+ if (!vendor)
|
||||||
|
+ {
|
||||||
|
+ warning (_("Error querying the rpm file `%s': %s"), filename,
|
||||||
|
+ err);
|
||||||
|
+ continue;
|
||||||
|
+ }
|
||||||
|
+ if (strcmp (vendor, "Red Hat, Inc.") == 0)
|
||||||
|
+ vendor_pass = 1;
|
||||||
|
+ else
|
||||||
|
+ vendor_fail = 1;
|
||||||
|
+ xfree (vendor);
|
||||||
|
+ }
|
||||||
|
+ count = vendor_pass != 0 && vendor_fail == 0;
|
||||||
|
+ }
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
rpmdbFreeIterator_p (mi);
|
||||||
|
}
|
||||||
|
@@ -976,6 +1015,20 @@ missing_rpm_enlist (const char *filename)
|
||||||
|
return count;
|
||||||
|
}
|
||||||
|
|
||||||
|
+#ifdef GDB_INDEX_VERIFY_VENDOR
|
||||||
|
+missing_rpm_enlist (const char *filename)
|
||||||
|
+{
|
||||||
|
+ return missing_rpm_enlist_1 (filename, 0);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+extern int rpm_verify_vendor (const char *filename);
|
||||||
|
+int
|
||||||
|
+rpm_verify_vendor (const char *filename)
|
||||||
|
+{
|
||||||
|
+ return missing_rpm_enlist_1 (filename, 1);
|
||||||
|
+}
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
static bool
|
||||||
|
missing_rpm_list_compar (const char *ap, const char *bp)
|
||||||
|
{
|
||||||
|
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
|
||||||
|
--- a/gdb/dwarf2/read.c
|
||||||
|
+++ b/gdb/dwarf2/read.c
|
||||||
|
@@ -3025,6 +3025,16 @@ read_gdb_index_from_buffer (const char *filename,
|
||||||
|
"set use-deprecated-index-sections on". */
|
||||||
|
if (version < 6 && !deprecated_ok)
|
||||||
|
{
|
||||||
|
+#ifdef GDB_INDEX_VERIFY_VENDOR
|
||||||
|
+ extern int rpm_verify_vendor (const char *filename);
|
||||||
|
+
|
||||||
|
+ /* Red Hat Developer Toolset exception. */
|
||||||
|
+ if (rpm_verify_vendor (filename))
|
||||||
|
+ {}
|
||||||
|
+ else
|
||||||
|
+ {
|
||||||
|
+
|
||||||
|
+#endif
|
||||||
|
static int warning_printed = 0;
|
||||||
|
if (!warning_printed)
|
||||||
|
{
|
||||||
|
@@ -3036,6 +3046,10 @@ to use the section anyway."),
|
||||||
|
warning_printed = 1;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
+#ifdef GDB_INDEX_VERIFY_VENDOR
|
||||||
|
+
|
||||||
|
+ }
|
||||||
|
+#endif
|
||||||
|
}
|
||||||
|
/* Version 7 indices generated by gold refer to the CU for a symbol instead
|
||||||
|
of the TU (for symbols coming from TUs),
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,237 @@
|
||||||
|
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||||
|
From: Fedora GDB patches <invalid@email.com>
|
||||||
|
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||||
|
Subject: gdb-6.6-buildid-locate-solib-missing-ids.patch
|
||||||
|
|
||||||
|
;; Fix loading of core files without build-ids but with build-ids in executables.
|
||||||
|
;; Load strictly build-id-checked core files only if no executable is specified
|
||||||
|
;; (Jan Kratochvil, RH BZ 1339862).
|
||||||
|
;;=push+jan
|
||||||
|
|
||||||
|
gdb returns an incorrect back trace when applying a debuginfo
|
||||||
|
https://bugzilla.redhat.com/show_bug.cgi?id=1339862
|
||||||
|
|
||||||
|
diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c
|
||||||
|
--- a/gdb/solib-svr4.c
|
||||||
|
+++ b/gdb/solib-svr4.c
|
||||||
|
@@ -1340,14 +1340,27 @@ svr4_read_so_list (svr4_info *info, CORE_ADDR lm, CORE_ADDR prev_lm,
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
- struct bfd_build_id *build_id;
|
||||||
|
+ struct bfd_build_id *build_id = NULL;
|
||||||
|
|
||||||
|
strncpy (newobj->so_original_name, buffer.get (), SO_NAME_MAX_PATH_SIZE - 1);
|
||||||
|
newobj->so_original_name[SO_NAME_MAX_PATH_SIZE - 1] = '\0';
|
||||||
|
/* May get overwritten below. */
|
||||||
|
strcpy (newobj->so_name, newobj->so_original_name);
|
||||||
|
|
||||||
|
- build_id = build_id_addr_get (((lm_info_svr4 *) newobj->lm_info)->l_ld);
|
||||||
|
+ /* In the case the main executable was found according to its build-id
|
||||||
|
+ (from a core file) prevent loading a different build of a library
|
||||||
|
+ with accidentally the same SO_NAME.
|
||||||
|
+
|
||||||
|
+ It suppresses bogus backtraces (and prints "??" there instead) if
|
||||||
|
+ the on-disk files no longer match the running program version.
|
||||||
|
+
|
||||||
|
+ If the main executable was not loaded according to its build-id do
|
||||||
|
+ not do any build-id checking of the libraries. There may be missing
|
||||||
|
+ build-ids dumped in the core file and we would map all the libraries
|
||||||
|
+ to the only existing file loaded that time - the executable. */
|
||||||
|
+ if (symfile_objfile != NULL
|
||||||
|
+ && (symfile_objfile->flags & OBJF_BUILD_ID_CORE_LOADED) != 0)
|
||||||
|
+ build_id = build_id_addr_get (li->l_ld);
|
||||||
|
if (build_id != NULL)
|
||||||
|
{
|
||||||
|
char *name, *build_id_filename;
|
||||||
|
@@ -1362,23 +1375,7 @@ svr4_read_so_list (svr4_info *info, CORE_ADDR lm, CORE_ADDR prev_lm,
|
||||||
|
xfree (name);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
- {
|
||||||
|
- debug_print_missing (newobj->so_name, build_id_filename);
|
||||||
|
-
|
||||||
|
- /* In the case the main executable was found according to
|
||||||
|
- its build-id (from a core file) prevent loading
|
||||||
|
- a different build of a library with accidentally the
|
||||||
|
- same SO_NAME.
|
||||||
|
-
|
||||||
|
- It suppresses bogus backtraces (and prints "??" there
|
||||||
|
- instead) if the on-disk files no longer match the
|
||||||
|
- running program version. */
|
||||||
|
-
|
||||||
|
- if (symfile_objfile != NULL
|
||||||
|
- && (symfile_objfile->flags
|
||||||
|
- & OBJF_BUILD_ID_CORE_LOADED) != 0)
|
||||||
|
- newobj->so_name[0] = 0;
|
||||||
|
- }
|
||||||
|
+ debug_print_missing (newobj->so_name, build_id_filename);
|
||||||
|
|
||||||
|
xfree (build_id_filename);
|
||||||
|
xfree (build_id);
|
||||||
|
diff --git a/gdb/testsuite/gdb.base/gcore-buildid-exec-but-not-solib-lib.c b/gdb/testsuite/gdb.base/gcore-buildid-exec-but-not-solib-lib.c
|
||||||
|
new file mode 100644
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/gdb/testsuite/gdb.base/gcore-buildid-exec-but-not-solib-lib.c
|
||||||
|
@@ -0,0 +1,21 @@
|
||||||
|
+/* Copyright 2010 Free Software Foundation, Inc.
|
||||||
|
+
|
||||||
|
+ This file is part of GDB.
|
||||||
|
+
|
||||||
|
+ This program is free software; you can redistribute it and/or modify
|
||||||
|
+ it under the terms of the GNU General Public License as published by
|
||||||
|
+ the Free Software Foundation; either version 3 of the License, or
|
||||||
|
+ (at your option) any later version.
|
||||||
|
+
|
||||||
|
+ This program is distributed in the hope that it will be useful,
|
||||||
|
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
+ GNU General Public License for more details.
|
||||||
|
+
|
||||||
|
+ You should have received a copy of the GNU General Public License
|
||||||
|
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
|
+
|
||||||
|
+void
|
||||||
|
+lib (void)
|
||||||
|
+{
|
||||||
|
+}
|
||||||
|
diff --git a/gdb/testsuite/gdb.base/gcore-buildid-exec-but-not-solib-main.c b/gdb/testsuite/gdb.base/gcore-buildid-exec-but-not-solib-main.c
|
||||||
|
new file mode 100644
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/gdb/testsuite/gdb.base/gcore-buildid-exec-but-not-solib-main.c
|
||||||
|
@@ -0,0 +1,25 @@
|
||||||
|
+/* Copyright 2010 Free Software Foundation, Inc.
|
||||||
|
+
|
||||||
|
+ This file is part of GDB.
|
||||||
|
+
|
||||||
|
+ This program is free software; you can redistribute it and/or modify
|
||||||
|
+ it under the terms of the GNU General Public License as published by
|
||||||
|
+ the Free Software Foundation; either version 3 of the License, or
|
||||||
|
+ (at your option) any later version.
|
||||||
|
+
|
||||||
|
+ This program is distributed in the hope that it will be useful,
|
||||||
|
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
+ GNU General Public License for more details.
|
||||||
|
+
|
||||||
|
+ You should have received a copy of the GNU General Public License
|
||||||
|
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
|
+
|
||||||
|
+extern void lib (void);
|
||||||
|
+
|
||||||
|
+int
|
||||||
|
+main (void)
|
||||||
|
+{
|
||||||
|
+ lib ();
|
||||||
|
+ return 0;
|
||||||
|
+}
|
||||||
|
diff --git a/gdb/testsuite/gdb.base/gcore-buildid-exec-but-not-solib.exp b/gdb/testsuite/gdb.base/gcore-buildid-exec-but-not-solib.exp
|
||||||
|
new file mode 100644
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/gdb/testsuite/gdb.base/gcore-buildid-exec-but-not-solib.exp
|
||||||
|
@@ -0,0 +1,105 @@
|
||||||
|
+# Copyright 2016 Free Software Foundation, Inc.
|
||||||
|
+
|
||||||
|
+# This program is free software; you can redistribute it and/or modify
|
||||||
|
+# it under the terms of the GNU General Public License as published by
|
||||||
|
+# the Free Software Foundation; either version 3 of the License, or
|
||||||
|
+# (at your option) any later version.
|
||||||
|
+#
|
||||||
|
+# This program is distributed in the hope that it will be useful,
|
||||||
|
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
+# GNU General Public License for more details.
|
||||||
|
+#
|
||||||
|
+# You should have received a copy of the GNU General Public License
|
||||||
|
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
+
|
||||||
|
+if {[skip_shlib_tests]} {
|
||||||
|
+ return 0
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+set testfile "gcore-buildid-exec-but-not-solib"
|
||||||
|
+set srcmainfile ${testfile}-main.c
|
||||||
|
+set srclibfile ${testfile}-lib.c
|
||||||
|
+set libfile [standard_output_file ${testfile}-lib.so]
|
||||||
|
+set objfile [standard_output_file ${testfile}-main.o]
|
||||||
|
+set executable ${testfile}-main
|
||||||
|
+set binfile [standard_output_file ${executable}]
|
||||||
|
+set gcorefile [standard_output_file ${executable}.gcore]
|
||||||
|
+set outdir [file dirname $binfile]
|
||||||
|
+
|
||||||
|
+if { [gdb_compile_shlib ${srcdir}/${subdir}/${srclibfile} ${libfile} "debug additional_flags=-Wl,--build-id"] != ""
|
||||||
|
+ || [gdb_compile ${srcdir}/${subdir}/${srcmainfile} ${objfile} object {debug}] != "" } {
|
||||||
|
+ unsupported "-Wl,--build-id compilation failed"
|
||||||
|
+ return -1
|
||||||
|
+}
|
||||||
|
+set opts [list debug shlib=${libfile} "additional_flags=-Wl,--build-id"]
|
||||||
|
+if { [gdb_compile ${objfile} ${binfile} executable $opts] != "" } {
|
||||||
|
+ unsupported "-Wl,--build-id compilation failed"
|
||||||
|
+ return -1
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+clean_restart $executable
|
||||||
|
+gdb_load_shlib $libfile
|
||||||
|
+
|
||||||
|
+# Does this gdb support gcore?
|
||||||
|
+set test "help gcore"
|
||||||
|
+gdb_test_multiple $test $test {
|
||||||
|
+ -re "Undefined command: .gcore.*\r\n$gdb_prompt $" {
|
||||||
|
+ # gcore command not supported -- nothing to test here.
|
||||||
|
+ unsupported "gdb does not support gcore on this target"
|
||||||
|
+ return -1;
|
||||||
|
+ }
|
||||||
|
+ -re "Save a core file .*\r\n$gdb_prompt $" {
|
||||||
|
+ pass $test
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+if { ![runto lib] } then {
|
||||||
|
+ return -1
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+set escapedfilename [string_to_regexp ${gcorefile}]
|
||||||
|
+
|
||||||
|
+set test "save a corefile"
|
||||||
|
+gdb_test_multiple "gcore ${gcorefile}" $test {
|
||||||
|
+ -re "Saved corefile ${escapedfilename}\r\n$gdb_prompt $" {
|
||||||
|
+ pass $test
|
||||||
|
+ }
|
||||||
|
+ -re "Can't create a corefile\r\n$gdb_prompt $" {
|
||||||
|
+ unsupported $test
|
||||||
|
+ return -1
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+# Now restart gdb and load the corefile.
|
||||||
|
+
|
||||||
|
+clean_restart $executable
|
||||||
|
+gdb_load_shlib $libfile
|
||||||
|
+
|
||||||
|
+set buildid [build_id_debug_filename_get $libfile]
|
||||||
|
+
|
||||||
|
+regsub {\.debug$} $buildid {} buildid
|
||||||
|
+
|
||||||
|
+set debugdir [standard_output_file ${testfile}-debugdir]
|
||||||
|
+file delete -force -- $debugdir
|
||||||
|
+
|
||||||
|
+file mkdir $debugdir/[file dirname $libfile]
|
||||||
|
+file copy $libfile $debugdir/${libfile}
|
||||||
|
+
|
||||||
|
+file mkdir $debugdir/[file dirname $buildid]
|
||||||
|
+file copy $libfile $debugdir/${buildid}
|
||||||
|
+
|
||||||
|
+remote_exec build "ln -s /lib ${debugdir}/"
|
||||||
|
+remote_exec build "ln -s /lib64 ${debugdir}/"
|
||||||
|
+# /usr is not needed, all the libs are in /lib64: libm.so.6 libc.so.6 ld-linux-x86-64.so.2
|
||||||
|
+
|
||||||
|
+gdb_test "set solib-absolute-prefix $debugdir"
|
||||||
|
+
|
||||||
|
+gdb_test_no_output "set debug-file-directory $debugdir" "set debug-file-directory"
|
||||||
|
+
|
||||||
|
+gdb_test "core ${gcorefile}" "Core was generated by .*" "re-load generated corefile"
|
||||||
|
+
|
||||||
|
+gdb_test "frame" "#0 \[^\r\n\]* lib .*" "library got loaded"
|
||||||
|
+
|
||||||
|
+gdb_test "bt"
|
||||||
|
+gdb_test "info shared"
|
File diff suppressed because it is too large
Load Diff
|
@ -1,41 +0,0 @@
|
||||||
2008-01-22 Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
||||||
|
|
||||||
Suppress messages `(no debugging symbols found)' on the commandline
|
|
||||||
option -readnever.
|
|
||||||
|
|
||||||
diff -u -X /home/jkratoch/.diffi.list -rup gdb-6.6-orig/gdb/symfile.c gdb-6.6/gdb/symfile.c
|
|
||||||
--- gdb-6.6-orig/gdb/symfile.c 2008-01-12 22:10:40.000000000 +0100
|
|
||||||
+++ gdb-6.6/gdb/symfile.c 2008-01-22 02:15:46.000000000 +0100
|
|
||||||
@@ -996,8 +996,10 @@ symbol_file_add_with_addrs_or_offsets (b
|
|
||||||
|
|
||||||
/* If the file has its own symbol tables it has no separate debug info.
|
|
||||||
`.dynsym'/`.symtab' go to MSYMBOLS, `.debug_info' goes to SYMTABS/PSYMTABS.
|
|
||||||
- `.gnu_debuglink' may no longer be present with `.note.gnu.build-id'. */
|
|
||||||
- if (objfile->psymtabs == NULL)
|
|
||||||
+ `.gnu_debuglink' may no longer be present with `.note.gnu.build-id'.
|
|
||||||
+ READNEVER_SYMBOL_FILES implies zero PSYMTABS and it makes no sense to be
|
|
||||||
+ finding any debug files. */
|
|
||||||
+ if (objfile->psymtabs == NULL && !readnever_symbol_files)
|
|
||||||
debugfile = find_separate_debug_file (objfile);
|
|
||||||
if (debugfile)
|
|
||||||
{
|
|
||||||
@@ -1021,7 +1023,8 @@ symbol_file_add_with_addrs_or_offsets (b
|
|
||||||
xfree (debugfile);
|
|
||||||
}
|
|
||||||
|
|
||||||
- if (!have_partial_symbols () && !have_full_symbols ())
|
|
||||||
+ if (!readnever_symbol_files && !have_partial_symbols ()
|
|
||||||
+ && !have_full_symbols ())
|
|
||||||
{
|
|
||||||
wrap_here ("");
|
|
||||||
printf_filtered (_("(no debugging symbols found)"));
|
|
||||||
@@ -2770,7 +2959,8 @@ reread_symbols (void)
|
|
||||||
zero is OK since dbxread.c also does what it needs to do if
|
|
||||||
objfile->global_psymbols.size is 0. */
|
|
||||||
(*objfile->sf->sym_read) (objfile, 0);
|
|
||||||
- if (!have_partial_symbols () && !have_full_symbols ())
|
|
||||||
+ if (!readnever_symbol_files && !have_partial_symbols ()
|
|
||||||
+ && !have_full_symbols ())
|
|
||||||
{
|
|
||||||
wrap_here ("");
|
|
||||||
printf_unfiltered (_("(no debugging symbols found)\n"));
|
|
|
@ -1,30 +0,0 @@
|
||||||
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=225783
|
|
||||||
|
|
||||||
|
|
||||||
--- gdb-6.6-orig/gdb/Makefile.in 2007-04-08 20:49:10.000000000 +0200
|
|
||||||
+++ gdb-6.6/gdb/Makefile.in 2007-04-08 23:22:40.000000000 +0200
|
|
||||||
@@ -1672,17 +1672,19 @@ po/$(PACKAGE).pot: force
|
|
||||||
|
|
||||||
.SUFFIXES: .y .l
|
|
||||||
.y.c:
|
|
||||||
- $(SHELL) $(YLWRAP) $< y.tab.c $@.tmp -- $(YACC) $(YFLAGS)
|
|
||||||
- -sed -e '/extern.*malloc/d' \
|
|
||||||
+ rm -f $@ $@.tmp
|
|
||||||
+ $(SHELL) $(YLWRAP) $< y.tab.c $@ -- $(YACC) $(YFLAGS) && mv $@ $@.tmp \
|
|
||||||
+ || (rm -f $@; false)
|
|
||||||
+ sed -e '/extern.*malloc/d' \
|
|
||||||
-e '/extern.*realloc/d' \
|
|
||||||
-e '/extern.*free/d' \
|
|
||||||
-e '/include.*malloc.h/d' \
|
|
||||||
-e 's/\([^x]\)malloc/\1xmalloc/g' \
|
|
||||||
-e 's/\([^x]\)realloc/\1xrealloc/g' \
|
|
||||||
-e '/^#line.*y.tab.c/d' \
|
|
||||||
- < $@.tmp > $@.new
|
|
||||||
- -rm $@.tmp
|
|
||||||
- mv $@.new ./$*.c
|
|
||||||
+ -e "s/^\(#line.*\)`basename $<`/\1`echo $<|sed 's/\//\\\\\//g'`/" \
|
|
||||||
+ < $@.tmp > $@
|
|
||||||
+ rm -f $@.tmp
|
|
||||||
.l.c:
|
|
||||||
if [ "$(FLEX)" ] && $(FLEX) --version >/dev/null 2>&1; then \
|
|
||||||
$(FLEX) -o$@ $< && \
|
|
|
@ -1,27 +0,0 @@
|
||||||
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=225783
|
|
||||||
|
|
||||||
--- gdb-6.8/gdb/testsuite/gdb.base/prelink.exp.orig 2008-07-12 08:56:43.000000000 +0200
|
|
||||||
+++ gdb-6.8/gdb/testsuite/gdb.base/prelink.exp 2008-07-12 08:59:59.000000000 +0200
|
|
||||||
@@ -55,7 +55,7 @@ if { [gdb_compile "${srcdir}/${subdir}/$
|
|
||||||
# single new unprelinked library address without wasting the first one/two
|
|
||||||
# memory areas. We do not care of the efficiency of loading such resulting
|
|
||||||
# exec-shield unfriendly prelinked library.
|
|
||||||
-if {[catch "system \"prelink -qNR --no-exec-shield ${libfile}\""] != 0} {
|
|
||||||
+if {[catch "system \"/usr/sbin/prelink -qNR --no-exec-shield ${libfile}\""] != 0} {
|
|
||||||
# Maybe we don't have prelink.
|
|
||||||
return -1
|
|
||||||
}
|
|
||||||
@@ -96,11 +96,11 @@ if { $found == 0 } {
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
-if {[catch "system \"prelink -uN ${libfile}\""] != 0} {
|
|
||||||
+if {[catch "system \"/usr/sbin/prelink -uN ${libfile}\""] != 0} {
|
|
||||||
untested "${testfile}.so was not prelinked, maybe system libraries are not prelinked?"
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
-catch "system \"prelink -qNR --no-exec-shield ${libfile}\""
|
|
||||||
+catch "system \"/usr/sbin/prelink -qNR --no-exec-shield ${libfile}\""
|
|
||||||
|
|
||||||
# Start with a fresh gdb
|
|
||||||
|
|
|
@ -1,3 +1,11 @@
|
||||||
|
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||||
|
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||||
|
Subject: gdb-6.6-bz229517-gcore-without-terminal.patch
|
||||||
|
|
||||||
|
;; Allow running `/usr/bin/gcore' with provided but inaccessible tty (BZ 229517).
|
||||||
|
;;=fedoratest
|
||||||
|
|
||||||
2007-04-22 Jan Kratochvil <jan.kratochvil@redhat.com>
|
2007-04-22 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||||
|
|
||||||
* gdb_gcore.sh: Redirect GDB from `</dev/null'.
|
* gdb_gcore.sh: Redirect GDB from `</dev/null'.
|
||||||
|
@ -6,34 +14,25 @@
|
||||||
|
|
||||||
* gdb.base/gcorebg.exp, gdb.base/gcorebg.c: New files.
|
* gdb.base/gcorebg.exp, gdb.base/gcorebg.c: New files.
|
||||||
|
|
||||||
|
diff --git a/gdb/testsuite/gdb.base/gcorebg.c b/gdb/testsuite/gdb.base/gcorebg.c
|
||||||
--- gdb-6.6-orig/gdb/gdb_gcore.sh 2005-12-17 17:33:59.000000000 -0500
|
new file mode 100644
|
||||||
+++ gdb-6.6/gdb/gdb_gcore.sh 2007-04-22 05:42:50.000000000 -0400
|
--- /dev/null
|
||||||
@@ -71,7 +71,9 @@
|
+++ b/gdb/testsuite/gdb.base/gcorebg.c
|
||||||
quit
|
@@ -0,0 +1,49 @@
|
||||||
EOF
|
|
||||||
|
|
||||||
- gdb -x $tmpfile -batch
|
|
||||||
+ # `</dev/null' to avoid touching interactive terminal if it is
|
|
||||||
+ # available but not accessible (SIGTTIN risk)
|
|
||||||
+ gdb -x $tmpfile -batch </dev/null
|
|
||||||
|
|
||||||
if [ -r $name.$pid ] ; then
|
|
||||||
rc=0
|
|
||||||
--- /dev/null 1 Jan 1970 00:00:00 -0000
|
|
||||||
+++ ./gdb/testsuite/gdb.base/gcorebg.c 25 Feb 2007 12:21:20 -0000
|
|
||||||
@@ -0,0 +1,43 @@
|
|
||||||
+#include <stdio.h>
|
+#include <stdio.h>
|
||||||
+#include <sys/types.h>
|
+#include <sys/types.h>
|
||||||
+#include <unistd.h>
|
+#include <unistd.h>
|
||||||
+#include <stdlib.h>
|
+#include <stdlib.h>
|
||||||
+#include <signal.h>
|
+#include <signal.h>
|
||||||
|
+#include <string.h>
|
||||||
|
+#include <assert.h>
|
||||||
+
|
+
|
||||||
+int main (int argc, char **argv)
|
+int main (int argc, char **argv)
|
||||||
+{
|
+{
|
||||||
+ pid_t pid = 0;
|
+ pid_t pid = 0;
|
||||||
+ pid_t ppid;
|
+ pid_t ppid;
|
||||||
+ char buf[256];
|
+ char buf[1024*2 + 500];
|
||||||
|
+ int gotint;
|
||||||
+
|
+
|
||||||
+ if (argc != 4)
|
+ if (argc != 4)
|
||||||
+ {
|
+ {
|
||||||
|
@ -50,8 +49,10 @@
|
||||||
+ if (strcmp (argv[1], "detached") == 0)
|
+ if (strcmp (argv[1], "detached") == 0)
|
||||||
+ setpgrp ();
|
+ setpgrp ();
|
||||||
+ ppid = getppid ();
|
+ ppid = getppid ();
|
||||||
+ sprintf (buf, "sh %s -o %s %d", argv[2], argv[3], (int) ppid);
|
+ gotint = snprintf (buf, sizeof (buf), "sh %s -o %s %d", argv[2], argv[3], (int) ppid);
|
||||||
|
+ assert (gotint < sizeof (buf));
|
||||||
+ system (buf);
|
+ system (buf);
|
||||||
|
+ fprintf (stderr, "Killing parent PID %d\n", ppid);
|
||||||
+ kill (ppid, SIGTERM);
|
+ kill (ppid, SIGTERM);
|
||||||
+ break;
|
+ break;
|
||||||
+
|
+
|
||||||
|
@ -61,14 +62,17 @@
|
||||||
+ break;
|
+ break;
|
||||||
+
|
+
|
||||||
+ default:
|
+ default:
|
||||||
|
+ fprintf (stderr,"Sleeping as PID %d\n", getpid ());
|
||||||
+ sleep (60);
|
+ sleep (60);
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ return 0;
|
+ return 0;
|
||||||
+}
|
+}
|
||||||
--- /dev/null 1 Jan 1970 00:00:00 -0000
|
diff --git a/gdb/testsuite/gdb.base/gcorebg.exp b/gdb/testsuite/gdb.base/gcorebg.exp
|
||||||
+++ ./gdb/testsuite/gdb.base/gcorebg.exp 25 Feb 2007 12:21:20 -0000
|
new file mode 100644
|
||||||
@@ -0,0 +1,120 @@
|
--- /dev/null
|
||||||
|
+++ b/gdb/testsuite/gdb.base/gcorebg.exp
|
||||||
|
@@ -0,0 +1,113 @@
|
||||||
+# Copyright 2007 Free Software Foundation, Inc.
|
+# Copyright 2007 Free Software Foundation, Inc.
|
||||||
+
|
+
|
||||||
+# This program is free software; you can redistribute it and/or modify
|
+# This program is free software; you can redistribute it and/or modify
|
||||||
|
@ -93,22 +97,15 @@
|
||||||
+# It also tests a regression with `gdb_gcore.sh' being run without its
|
+# It also tests a regression with `gdb_gcore.sh' being run without its
|
||||||
+# accessible terminal.
|
+# accessible terminal.
|
||||||
+
|
+
|
||||||
+if $tracelevel then {
|
|
||||||
+ strace $tracelevel
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+set prms_id 0
|
|
||||||
+set bug_id 0
|
|
||||||
+
|
|
||||||
+if ![info exists GCORE] {
|
+if ![info exists GCORE] {
|
||||||
+ set GCORE "${srcdir}/../gdb_gcore.sh"
|
+ set GCORE "[standard_output_file ../../../../gcore]"
|
||||||
+}
|
+}
|
||||||
+verbose "using GCORE = $GCORE" 2
|
+verbose "using GCORE = $GCORE" 2
|
||||||
+
|
+
|
||||||
+set testfile "gcorebg"
|
+set testfile "gcorebg"
|
||||||
+set srcfile ${testfile}.c
|
+set srcfile ${testfile}.c
|
||||||
+set binfile ${objdir}/${subdir}/${testfile}
|
+set binfile [standard_output_file ${testfile}]
|
||||||
+set corefile ${objdir}/${subdir}/${testfile}.test
|
+set corefile [standard_output_file ${testfile}.test]
|
||||||
+
|
+
|
||||||
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
|
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
|
||||||
+ untested gcorebg.exp
|
+ untested gcorebg.exp
|
||||||
|
@ -157,11 +154,11 @@
|
||||||
+ pass "Spawning $detached gcore"
|
+ pass "Spawning $detached gcore"
|
||||||
+ remote_expect target 20 {
|
+ remote_expect target 20 {
|
||||||
+ timeout {
|
+ timeout {
|
||||||
+ fail "Spawned $detached gcore finished"
|
+ fail "Spawned $detached gcore finished (timeout)"
|
||||||
+ remote_exec target "kill -9 -[exp_pid -i $res]"
|
+ remote_exec target "kill -9 -[exp_pid -i $res]"
|
||||||
+ return 1
|
+ return 1
|
||||||
+ }
|
+ }
|
||||||
+ eof {
|
+ "Saved corefile .*\r\nKilling parent PID " {
|
||||||
+ pass "Spawned $detached gcore finished"
|
+ pass "Spawned $detached gcore finished"
|
||||||
+ remote_wait target 20
|
+ remote_wait target 20
|
||||||
+ }
|
+ }
|
||||||
|
|
|
@ -1,12 +1,21 @@
|
||||||
|
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||||
|
From: Fedora GDB patches <invalid@email.com>
|
||||||
|
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||||
|
Subject: gdb-6.6-bz230000-power6-disassembly-test.patch
|
||||||
|
|
||||||
|
;; Testcase for PPC Power6/DFP instructions disassembly (BZ 230000).
|
||||||
|
;;=fedoratest
|
||||||
|
|
||||||
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=230000
|
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=230000
|
||||||
|
|
||||||
The original testcase
|
The original testcase
|
||||||
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=230000#c1
|
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=230000#c1
|
||||||
requires too recent GCC.
|
requires too recent GCC.
|
||||||
|
|
||||||
|
diff --git a/gdb/testsuite/gdb.arch/powerpc-power6.exp b/gdb/testsuite/gdb.arch/powerpc-power6.exp
|
||||||
--- /dev/null 1 Jan 1970 00:00:00 -0000
|
new file mode 100644
|
||||||
+++ ./gdb/testsuite/gdb.arch/powerpc-power6.exp 25 Feb 2007 18:27:39 -0000
|
--- /dev/null
|
||||||
|
+++ b/gdb/testsuite/gdb.arch/powerpc-power6.exp
|
||||||
@@ -0,0 +1,54 @@
|
@@ -0,0 +1,54 @@
|
||||||
+# Copyright 2007 Free Software Foundation, Inc.
|
+# Copyright 2007 Free Software Foundation, Inc.
|
||||||
+
|
+
|
||||||
|
@ -33,7 +42,7 @@ requires too recent GCC.
|
||||||
+
|
+
|
||||||
+set testfile "powerpc-power6"
|
+set testfile "powerpc-power6"
|
||||||
+set srcfile ${testfile}.s
|
+set srcfile ${testfile}.s
|
||||||
+set objfile ${objdir}/${subdir}/${testfile}.o
|
+set objfile [standard_output_file ${testfile}.o]
|
||||||
+
|
+
|
||||||
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${objfile}" object {debug}] != "" } {
|
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${objfile}" object {debug}] != "" } {
|
||||||
+ untested "PowerPC prologue tests"
|
+ untested "PowerPC prologue tests"
|
||||||
|
@ -53,17 +62,19 @@ requires too recent GCC.
|
||||||
+gdb_test "disass func" ":\tdcbzl *r8,r9\r\n.*" "Power5 disassembly dcbzl"
|
+gdb_test "disass func" ":\tdcbzl *r8,r9\r\n.*" "Power5 disassembly dcbzl"
|
||||||
+gdb_test "disass func" ":\tfrsqrtes *f10,f11\r\n.*" "Power5 disassembly frsqrtes"
|
+gdb_test "disass func" ":\tfrsqrtes *f10,f11\r\n.*" "Power5 disassembly frsqrtes"
|
||||||
+gdb_test "disass func" ":\tdadd *f1,f2,f1\r\n.*" "Power6 disassembly dadd"
|
+gdb_test "disass func" ":\tdadd *f1,f2,f1\r\n.*" "Power6 disassembly dadd"
|
||||||
+gdb_test "disass func" ":\tdaddq *f1,f2,f1\r\n.*" "Power6 disassembly daddq"
|
+gdb_test "disass func" ":\tdaddq *f0,f2,f0\r\n.*" "Power6 disassembly daddq"
|
||||||
+gdb_test "disass func" ":\tdsub *f1,f2,f1\r\n.*" "Power6 disassembly dsub"
|
+gdb_test "disass func" ":\tdsub *f1,f2,f1\r\n.*" "Power6 disassembly dsub"
|
||||||
+gdb_test "disass func" ":\tdsubq *f1,f2,f1\r\n.*" "Power6 disassembly dsubq"
|
+gdb_test "disass func" ":\tdsubq *f0,f2,f0\r\n.*" "Power6 disassembly dsubq"
|
||||||
+gdb_test "disass func" ":\tdmul *f1,f2,f1\r\n.*" "Power6 disassembly dmul"
|
+gdb_test "disass func" ":\tdmul *f1,f2,f1\r\n.*" "Power6 disassembly dmul"
|
||||||
+gdb_test "disass func" ":\tdmulq *f1,f2,f1\r\n.*" "Power6 disassembly dmulq"
|
+gdb_test "disass func" ":\tdmulq *f0,f2,f0\r\n.*" "Power6 disassembly dmulq"
|
||||||
+gdb_test "disass func" ":\tddiv *f1,f2,f1\r\n.*" "Power6 disassembly ddiv"
|
+gdb_test "disass func" ":\tddiv *f1,f2,f1\r\n.*" "Power6 disassembly ddiv"
|
||||||
+gdb_test "disass func" ":\tddivq *f1,f2,f1\r\n.*" "Power6 disassembly ddivq"
|
+gdb_test "disass func" ":\tddivq *f0,f2,f0\r\n.*" "Power6 disassembly ddivq"
|
||||||
+gdb_test "disass func" ":\tdcmpu *cr1,f2,f1\r\n.*" "Power6 disassembly dcmpu"
|
+gdb_test "disass func" ":\tdcmpu *cr1,f2,f1\r\n.*" "Power6 disassembly dcmpu"
|
||||||
+gdb_test "disass func" ":\tdcmpuq *cr1,f2,f1\r\n.*" "Power6 disassembly dcmpuq"
|
+gdb_test "disass func" ":\tdcmpuq *cr1,f2,f0\r\n.*" "Power6 disassembly dcmpuq"
|
||||||
--- /dev/null 1 Jan 1970 00:00:00 -0000
|
diff --git a/gdb/testsuite/gdb.arch/powerpc-power6.s b/gdb/testsuite/gdb.arch/powerpc-power6.s
|
||||||
+++ ./gdb/testsuite/gdb.arch/powerpc-power6.s 25 Feb 2007 18:27:39 -0000
|
new file mode 100644
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/gdb/testsuite/gdb.arch/powerpc-power6.s
|
||||||
@@ -0,0 +1,16 @@
|
@@ -0,0 +1,16 @@
|
||||||
+ .text
|
+ .text
|
||||||
+ .globl func
|
+ .globl func
|
||||||
|
@ -72,12 +83,12 @@ requires too recent GCC.
|
||||||
+ .long 0x7c284fec /* dcbzl r8,r9 */
|
+ .long 0x7c284fec /* dcbzl r8,r9 */
|
||||||
+ .long 0xed405834 /* frsqrtes f10,f11 */
|
+ .long 0xed405834 /* frsqrtes f10,f11 */
|
||||||
+ .long 0xec220804 /* dadd f1,f2,f1 */
|
+ .long 0xec220804 /* dadd f1,f2,f1 */
|
||||||
+ .long 0xfc220804 /* daddq f1,f2,f1 */
|
+ .long 0xfc020004 /* daddq f0,f2,f0 */
|
||||||
+ .long 0xec220c04 /* dsub f1,f2,f1 */
|
+ .long 0xec220c04 /* dsub f1,f2,f1 */
|
||||||
+ .long 0xfc220c04 /* dsubq f1,f2,f1 */
|
+ .long 0xfc020404 /* dsubq f0,f2,f0 */
|
||||||
+ .long 0xec220844 /* dmul f1,f2,f1 */
|
+ .long 0xec220844 /* dmul f1,f2,f1 */
|
||||||
+ .long 0xfc220844 /* dmulq f1,f2,f1 */
|
+ .long 0xfc020044 /* dmulq f0,f2,f0 */
|
||||||
+ .long 0xec220c44 /* ddiv f1,f2,f1 */
|
+ .long 0xec220c44 /* ddiv f1,f2,f1 */
|
||||||
+ .long 0xfc220c44 /* ddivq f1,f2,f1 */
|
+ .long 0xfc020444 /* ddivq f0,f2,f0 */
|
||||||
+ .long 0xec820d04 /* dcmpu cr1,f2,f1 */
|
+ .long 0xec820d04 /* dcmpu cr1,f2,f1 */
|
||||||
+ .long 0xfc820d04 /* dcmpuq cr1,f2,f1 */
|
+ .long 0xfc820504 /* dcmpuq cr1,f2,f0 */
|
||||||
|
|
|
@ -1,128 +0,0 @@
|
||||||
2008-03-01 Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
||||||
|
|
||||||
Port to GDB-6.8pre.
|
|
||||||
Remove the `[' character from the GDB-6.8 default message.
|
|
||||||
|
|
||||||
Index: gdb-6.7.50.20080227/gdb/linux-nat.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.7.50.20080227.orig/gdb/linux-nat.c 2008-03-01 10:30:48.000000000 +0100
|
|
||||||
+++ gdb-6.7.50.20080227/gdb/linux-nat.c 2008-03-01 10:48:25.000000000 +0100
|
|
||||||
@@ -415,7 +415,7 @@ linux_child_follow_fork (struct target_o
|
|
||||||
/* Detach new forked process? */
|
|
||||||
if (detach_fork)
|
|
||||||
{
|
|
||||||
- if (info_verbose || debug_linux_nat)
|
|
||||||
+ if (1 /* Fedora Bug 235197 */ || info_verbose || debug_linux_nat)
|
|
||||||
{
|
|
||||||
target_terminal_ours ();
|
|
||||||
fprintf_filtered (gdb_stdlog,
|
|
||||||
Index: gdb-6.7.50.20080227/gdb/testsuite/gdb.base/fork-detach.c
|
|
||||||
===================================================================
|
|
||||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
|
||||||
+++ gdb-6.7.50.20080227/gdb/testsuite/gdb.base/fork-detach.c 2008-03-01 10:30:49.000000000 +0100
|
|
||||||
@@ -0,0 +1,57 @@
|
|
||||||
+/* This testcase is part of GDB, the GNU debugger.
|
|
||||||
+
|
|
||||||
+ Copyright 2007 Free Software Foundation, Inc.
|
|
||||||
+
|
|
||||||
+ This program is free software; you can redistribute it and/or modify
|
|
||||||
+ it under the terms of the GNU General Public License as published by
|
|
||||||
+ the Free Software Foundation; either version 2 of the License, or
|
|
||||||
+ (at your option) any later version.
|
|
||||||
+
|
|
||||||
+ This program is distributed in the hope that it will be useful,
|
|
||||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
+ GNU General Public License for more details.
|
|
||||||
+
|
|
||||||
+ You should have received a copy of the GNU General Public License
|
|
||||||
+ along with this program; if not, write to the Free Software
|
|
||||||
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
+
|
|
||||||
+ Please email any bugs, comments, and/or additions to this file to:
|
|
||||||
+ bug-gdb@prep.ai.mit.edu */
|
|
||||||
+
|
|
||||||
+#include <sys/types.h>
|
|
||||||
+#include <sys/wait.h>
|
|
||||||
+#include <unistd.h>
|
|
||||||
+#include <assert.h>
|
|
||||||
+#include <stdlib.h>
|
|
||||||
+
|
|
||||||
+static void func (void)
|
|
||||||
+{
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+int main (void)
|
|
||||||
+{
|
|
||||||
+ pid_t child;
|
|
||||||
+
|
|
||||||
+ child = fork ();
|
|
||||||
+ switch (child)
|
|
||||||
+ {
|
|
||||||
+ case -1:
|
|
||||||
+ abort ();
|
|
||||||
+ case 0:
|
|
||||||
+ func ();
|
|
||||||
+ break;
|
|
||||||
+ default:
|
|
||||||
+ {
|
|
||||||
+/* We do not test the switching to the other fork by GDB `fork 1'. */
|
|
||||||
+#if 0
|
|
||||||
+ pid_t got;
|
|
||||||
+
|
|
||||||
+ got = waitpid (child, NULL, 0);
|
|
||||||
+ assert (got == child);
|
|
||||||
+#endif
|
|
||||||
+ break;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ return 0;
|
|
||||||
+}
|
|
||||||
Index: gdb-6.7.50.20080227/gdb/testsuite/gdb.base/fork-detach.exp
|
|
||||||
===================================================================
|
|
||||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
|
||||||
+++ gdb-6.7.50.20080227/gdb/testsuite/gdb.base/fork-detach.exp 2008-03-01 10:49:36.000000000 +0100
|
|
||||||
@@ -0,0 +1,43 @@
|
|
||||||
+# Copyright 2007 Free Software Foundation, Inc.
|
|
||||||
+
|
|
||||||
+# This program is free software; you can redistribute it and/or modify
|
|
||||||
+# it under the terms of the GNU General Public License as published by
|
|
||||||
+# the Free Software Foundation; either version 2 of the License, or
|
|
||||||
+# (at your option) any later version.
|
|
||||||
+#
|
|
||||||
+# This program is distributed in the hope that it will be useful,
|
|
||||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
+# GNU General Public License for more details.
|
|
||||||
+#
|
|
||||||
+# You should have received a copy of the GNU General Public License
|
|
||||||
+# along with this program; if not, write to the Free Software
|
|
||||||
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
+
|
|
||||||
+if $tracelevel then {
|
|
||||||
+ strace $tracelevel
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+set prms_id 0
|
|
||||||
+set bug_id 0
|
|
||||||
+
|
|
||||||
+set testfile fork-detach
|
|
||||||
+set srcfile ${testfile}.c
|
|
||||||
+set binfile ${objdir}/${subdir}/${testfile}
|
|
||||||
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
|
|
||||||
+ untested "Couldn't compile test program"
|
|
||||||
+ return -1
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+# Get things started.
|
|
||||||
+
|
|
||||||
+gdb_exit
|
|
||||||
+gdb_start
|
|
||||||
+gdb_reinitialize_dir $srcdir/$subdir
|
|
||||||
+gdb_load ${binfile}
|
|
||||||
+
|
|
||||||
+gdb_run_cmd
|
|
||||||
+# `Starting program: .*' prefix is available since gdb-6.7.
|
|
||||||
+gdb_test "" \
|
|
||||||
+ "Detaching after fork from child process.*Program exited normally\\..*" \
|
|
||||||
+ "Info message caught"
|
|
|
@ -1,10 +1,20 @@
|
||||||
|
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||||
|
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||||
|
Subject: gdb-6.6-bz237572-ppc-atomic-sequence-test.patch
|
||||||
|
|
||||||
|
;; Support for stepping over PPC atomic instruction sequences (BZ 237572).
|
||||||
|
;;=fedoratest
|
||||||
|
|
||||||
2007-06-25 Jan Kratochvil <jan.kratochvil@redhat.com>
|
2007-06-25 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||||
|
|
||||||
* gdb.threads/atomic-seq-threaded.c,
|
* gdb.threads/atomic-seq-threaded.c,
|
||||||
gdb.threads/atomic-seq-threaded.exp: New files.
|
gdb.threads/atomic-seq-threaded.exp: New files.
|
||||||
|
|
||||||
--- /dev/null 1 Jan 1970 00:00:00 -0000
|
diff --git a/gdb/testsuite/gdb.threads/atomic-seq-threaded.c b/gdb/testsuite/gdb.threads/atomic-seq-threaded.c
|
||||||
+++ ./gdb/testsuite/gdb.threads/atomic-seq-threaded.c 25 Jun 2007 20:38:21 -0000
|
new file mode 100644
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/gdb/testsuite/gdb.threads/atomic-seq-threaded.c
|
||||||
@@ -0,0 +1,171 @@
|
@@ -0,0 +1,171 @@
|
||||||
+/* This testcase is part of GDB, the GNU debugger.
|
+/* This testcase is part of GDB, the GNU debugger.
|
||||||
+
|
+
|
||||||
|
@ -177,8 +187,10 @@
|
||||||
+
|
+
|
||||||
+ return 0; /* _exit_ */
|
+ return 0; /* _exit_ */
|
||||||
+}
|
+}
|
||||||
--- /dev/null 1 Jan 1970 00:00:00 -0000
|
diff --git a/gdb/testsuite/gdb.threads/atomic-seq-threaded.exp b/gdb/testsuite/gdb.threads/atomic-seq-threaded.exp
|
||||||
+++ ./gdb/testsuite/gdb.threads/atomic-seq-threaded.exp 25 Jun 2007 20:38:21 -0000
|
new file mode 100644
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/gdb/testsuite/gdb.threads/atomic-seq-threaded.exp
|
||||||
@@ -0,0 +1,84 @@
|
@@ -0,0 +1,84 @@
|
||||||
+# atomic-seq-threaded.exp -- Test case for stepping over RISC atomic code seqs.
|
+# atomic-seq-threaded.exp -- Test case for stepping over RISC atomic code seqs.
|
||||||
+# This variant testcases the code for stepping another thread while skipping
|
+# This variant testcases the code for stepping another thread while skipping
|
||||||
|
@ -205,7 +217,7 @@
|
||||||
+
|
+
|
||||||
+set testfile atomic-seq-threaded
|
+set testfile atomic-seq-threaded
|
||||||
+set srcfile ${testfile}.c
|
+set srcfile ${testfile}.c
|
||||||
+set binfile ${objdir}/${subdir}/${testfile}
|
+set binfile [standard_output_file ${testfile}]
|
||||||
+
|
+
|
||||||
+foreach opts {{} {compiler=gcc4} {FAIL}} {
|
+foreach opts {{} {compiler=gcc4} {FAIL}} {
|
||||||
+ if {$opts eq "FAIL"} {
|
+ if {$opts eq "FAIL"} {
|
||||||
|
@ -230,7 +242,7 @@
|
||||||
+# Pass after pthread_create () without any watchpoint active.
|
+# Pass after pthread_create () without any watchpoint active.
|
||||||
+set line [gdb_get_line_number "_create_after_"]
|
+set line [gdb_get_line_number "_create_after_"]
|
||||||
+gdb_test "tbreak $line" \
|
+gdb_test "tbreak $line" \
|
||||||
+ "Breakpoint (\[0-9\]+) at .*$srcfile, line $line\..*" \
|
+ "reakpoint (\[0-9\]+) at .*$srcfile, line $line\..*" \
|
||||||
+ "set breakpoint after pthread_create ()"
|
+ "set breakpoint after pthread_create ()"
|
||||||
+gdb_test "c" \
|
+gdb_test "c" \
|
||||||
+ ".*/\\* _create_after_ \\*/.*" \
|
+ ".*/\\* _create_after_ \\*/.*" \
|
||||||
|
@ -254,7 +266,7 @@
|
||||||
+# Critical code path is stepped through at this point.
|
+# Critical code path is stepped through at this point.
|
||||||
+set line [gdb_get_line_number "_exit_"]
|
+set line [gdb_get_line_number "_exit_"]
|
||||||
+gdb_test "tbreak $line" \
|
+gdb_test "tbreak $line" \
|
||||||
+ "Breakpoint \[0-9\]+ at .*$srcfile, line $line\..*" \
|
+ "reakpoint \[0-9\]+ at .*$srcfile, line $line\..*" \
|
||||||
+ "set breakpoint at _exit_"
|
+ "set breakpoint at _exit_"
|
||||||
+gdb_test "c" \
|
+gdb_test "c" \
|
||||||
+ ".*/\\* _exit_ \\*/.*" \
|
+ ".*/\\* _exit_ \\*/.*" \
|
||||||
|
|
|
@ -1,146 +0,0 @@
|
||||||
2007-07-08 Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
||||||
|
|
||||||
* linux-nat.c (linux_lwp_is_zombie): New function.
|
|
||||||
(wait_lwp): Fix lockup on exit of the thread group leader.
|
|
||||||
(linux_xfer_partial): Renamed to ...
|
|
||||||
(linux_xfer_partial_lwp): ... here.
|
|
||||||
(linux_xfer_partial): New function wrapping LINUX_XFER_PARTIAL_LWP.
|
|
||||||
|
|
||||||
2008-02-24 Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
||||||
|
|
||||||
Port to GDB-6.8pre.
|
|
||||||
|
|
||||||
Index: gdb-6.8cvs20080219/gdb/linux-nat.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.8cvs20080219.orig/gdb/linux-nat.c 2008-02-21 12:03:38.000000000 +0100
|
|
||||||
+++ gdb-6.8cvs20080219/gdb/linux-nat.c 2008-02-21 12:05:01.000000000 +0100
|
|
||||||
@@ -1570,6 +1570,31 @@ linux_handle_extended_wait (struct lwp_i
|
|
||||||
_("unknown ptrace event %d"), event);
|
|
||||||
}
|
|
||||||
|
|
||||||
+static int
|
|
||||||
+linux_lwp_is_zombie (long lwp)
|
|
||||||
+{
|
|
||||||
+ char buffer[MAXPATHLEN];
|
|
||||||
+ FILE *procfile;
|
|
||||||
+ int retval = 0;
|
|
||||||
+
|
|
||||||
+ sprintf (buffer, "/proc/%ld/status", lwp);
|
|
||||||
+ procfile = fopen (buffer, "r");
|
|
||||||
+ if (procfile == NULL)
|
|
||||||
+ {
|
|
||||||
+ warning (_("unable to open /proc file '%s'"), buffer);
|
|
||||||
+ return 0;
|
|
||||||
+ }
|
|
||||||
+ while (fgets (buffer, sizeof (buffer), procfile) != NULL)
|
|
||||||
+ if (strcmp (buffer, "State:\tZ (zombie)\n") == 0)
|
|
||||||
+ {
|
|
||||||
+ retval = 1;
|
|
||||||
+ break;
|
|
||||||
+ }
|
|
||||||
+ fclose (procfile);
|
|
||||||
+
|
|
||||||
+ return retval;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
/* Wait for LP to stop. Returns the wait status, or 0 if the LWP has
|
|
||||||
exited. */
|
|
||||||
|
|
||||||
@@ -1577,16 +1602,31 @@ static int
|
|
||||||
wait_lwp (struct lwp_info *lp)
|
|
||||||
{
|
|
||||||
pid_t pid;
|
|
||||||
- int status;
|
|
||||||
+ int status = 0;
|
|
||||||
int thread_dead = 0;
|
|
||||||
|
|
||||||
gdb_assert (!lp->stopped);
|
|
||||||
gdb_assert (lp->status == 0);
|
|
||||||
|
|
||||||
- pid = my_waitpid (GET_LWP (lp->ptid), &status, 0);
|
|
||||||
- if (pid == -1 && errno == ECHILD)
|
|
||||||
+ /* Thread group leader may have exited but we would lock up by WAITPID as it
|
|
||||||
+ waits on all its threads; __WCLONE is not applicable for the leader.
|
|
||||||
+ The thread leader restrictions is only a performance optimization here.
|
|
||||||
+ LINUX_NAT_THREAD_ALIVE cannot be used here as it requires a STOPPED
|
|
||||||
+ process; it gets ESRCH both for the zombie and for running processes. */
|
|
||||||
+ if (is_lwp (lp->ptid) && GET_PID (lp->ptid) == GET_LWP (lp->ptid)
|
|
||||||
+ && linux_lwp_is_zombie (GET_LWP (lp->ptid)))
|
|
||||||
+ {
|
|
||||||
+ thread_dead = 1;
|
|
||||||
+ if (debug_linux_nat)
|
|
||||||
+ fprintf_unfiltered (gdb_stdlog, "WL: Threads leader %s vanished.\n",
|
|
||||||
+ target_pid_to_str (lp->ptid));
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ if (!thread_dead)
|
|
||||||
{
|
|
||||||
- pid = my_waitpid (GET_LWP (lp->ptid), &status, __WCLONE);
|
|
||||||
+ pid = my_waitpid (GET_LWP (lp->ptid), &status, 0);
|
|
||||||
+ if (pid == -1 && errno == ECHILD)
|
|
||||||
+ pid = my_waitpid (GET_LWP (lp->ptid), &status, __WCLONE);
|
|
||||||
if (pid == -1 && errno == ECHILD)
|
|
||||||
{
|
|
||||||
/* The thread has previously exited. We need to delete it
|
|
||||||
@@ -3451,10 +3491,12 @@ linux_proc_pending_signals (int pid, sig
|
|
||||||
fclose (procfile);
|
|
||||||
}
|
|
||||||
|
|
||||||
+/* Transfer from the specific LWP currently set by PID of INFERIOR_PTID. */
|
|
||||||
+
|
|
||||||
static LONGEST
|
|
||||||
-linux_xfer_partial (struct target_ops *ops, enum target_object object,
|
|
||||||
- const char *annex, gdb_byte *readbuf,
|
|
||||||
- const gdb_byte *writebuf, ULONGEST offset, LONGEST len)
|
|
||||||
+linux_xfer_partial_lwp (struct target_ops *ops, enum target_object object,
|
|
||||||
+ const char *annex, gdb_byte *readbuf,
|
|
||||||
+ const gdb_byte *writebuf, ULONGEST offset, LONGEST len)
|
|
||||||
{
|
|
||||||
LONGEST xfer;
|
|
||||||
|
|
||||||
@@ -3495,6 +3537,45 @@ linux_xfer_partial (struct target_ops *o
|
|
||||||
offset, len);
|
|
||||||
}
|
|
||||||
|
|
||||||
+/* nptl_db expects being able to transfer memory just by specifying PID.
|
|
||||||
+ After the thread group leader exists the Linux kernel turns the task
|
|
||||||
+ into zombie no longer permitting accesses to its memory.
|
|
||||||
+ Transfer the memory from an arbitrary LWP_LIST entry in such case. */
|
|
||||||
+
|
|
||||||
+static LONGEST
|
|
||||||
+linux_xfer_partial (struct target_ops *ops, enum target_object object,
|
|
||||||
+ const char *annex, gdb_byte *readbuf,
|
|
||||||
+ const gdb_byte *writebuf, ULONGEST offset, LONGEST len)
|
|
||||||
+{
|
|
||||||
+ LONGEST xfer;
|
|
||||||
+ struct lwp_info *lp;
|
|
||||||
+ /* Not using SAVE_INFERIOR_PTID already here for better performance. */
|
|
||||||
+ struct cleanup *old_chain = NULL;
|
|
||||||
+ ptid_t inferior_ptid_orig = inferior_ptid;
|
|
||||||
+
|
|
||||||
+ errno = 0;
|
|
||||||
+ xfer = linux_xfer_partial_lwp (ops, object, annex, readbuf, writebuf,
|
|
||||||
+ offset, len);
|
|
||||||
+
|
|
||||||
+ for (lp = lwp_list; xfer == 0 && (errno == EACCES || errno == ESRCH)
|
|
||||||
+ && lp != NULL; lp = lp->next)
|
|
||||||
+ {
|
|
||||||
+ if (!is_lwp (lp->ptid) || ptid_equal (lp->ptid, inferior_ptid_orig))
|
|
||||||
+ continue;
|
|
||||||
+
|
|
||||||
+ if (old_chain == NULL)
|
|
||||||
+ old_chain = save_inferior_ptid ();
|
|
||||||
+ inferior_ptid = BUILD_LWP (GET_LWP (lp->ptid), GET_LWP (lp->ptid));
|
|
||||||
+ errno = 0;
|
|
||||||
+ xfer = linux_xfer_partial_lwp (ops, object, annex, readbuf, writebuf,
|
|
||||||
+ offset, len);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ if (old_chain != NULL)
|
|
||||||
+ do_cleanups (old_chain);
|
|
||||||
+ return xfer;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
/* Create a prototype generic GNU/Linux target. The client can override
|
|
||||||
it with local methods. */
|
|
||||||
|
|
|
@ -1,121 +0,0 @@
|
||||||
2007-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
||||||
|
|
||||||
* gdb.threads/leader-exit.c, gdb.threads/leader-exit.exp: New files.
|
|
||||||
|
|
||||||
--- /dev/null 1 Jan 1970 00:00:00 -0000
|
|
||||||
+++ ./gdb/testsuite/gdb.threads/leader-exit.c 7 Jul 2007 15:21:57 -0000
|
|
||||||
@@ -0,0 +1,47 @@
|
|
||||||
+/* Clean exit of the thread group leader should not break GDB.
|
|
||||||
+
|
|
||||||
+ Copyright 2007 Free Software Foundation, Inc.
|
|
||||||
+
|
|
||||||
+ This file is part of GDB.
|
|
||||||
+
|
|
||||||
+ This program is free software; you can redistribute it and/or modify
|
|
||||||
+ it under the terms of the GNU General Public License as published by
|
|
||||||
+ the Free Software Foundation; either version 2 of the License, or
|
|
||||||
+ (at your option) any later version.
|
|
||||||
+
|
|
||||||
+ This program is distributed in the hope that it will be useful,
|
|
||||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
+ GNU General Public License for more details.
|
|
||||||
+
|
|
||||||
+ You should have received a copy of the GNU General Public License
|
|
||||||
+ along with this program; if not, write to the Free Software
|
|
||||||
+ Foundation, Inc., 59 Temple Place - Suite 330,
|
|
||||||
+ Boston, MA 02111-1307, USA. */
|
|
||||||
+
|
|
||||||
+#include <pthread.h>
|
|
||||||
+#include <assert.h>
|
|
||||||
+#include <unistd.h>
|
|
||||||
+
|
|
||||||
+static void *start (void *arg)
|
|
||||||
+{
|
|
||||||
+ for (;;)
|
|
||||||
+ pause ();
|
|
||||||
+ /* NOTREACHED */
|
|
||||||
+ assert (0);
|
|
||||||
+ return arg;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+int main (void)
|
|
||||||
+{
|
|
||||||
+ pthread_t thread;
|
|
||||||
+ int i;
|
|
||||||
+
|
|
||||||
+ i = pthread_create (&thread, NULL, start, NULL); /* create1 */
|
|
||||||
+ assert (i == 0);
|
|
||||||
+
|
|
||||||
+ pthread_exit (NULL);
|
|
||||||
+ /* NOTREACHED */
|
|
||||||
+ assert (0);
|
|
||||||
+ return 0;
|
|
||||||
+}
|
|
||||||
--- /dev/null 1 Jan 1970 00:00:00 -0000
|
|
||||||
+++ ./gdb/testsuite/gdb.threads/leader-exit.exp 7 Jul 2007 15:21:57 -0000
|
|
||||||
@@ -0,0 +1,64 @@
|
|
||||||
+# Copyright (C) 2007 Free Software Foundation, Inc.
|
|
||||||
+
|
|
||||||
+# This program is free software; you can redistribute it and/or modify
|
|
||||||
+# it under the terms of the GNU General Public License as published by
|
|
||||||
+# the Free Software Foundation; either version 2 of the License, or
|
|
||||||
+# (at your option) any later version.
|
|
||||||
+#
|
|
||||||
+# This program is distributed in the hope that it will be useful,
|
|
||||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
+# GNU General Public License for more details.
|
|
||||||
+#
|
|
||||||
+# You should have received a copy of the GNU General Public License
|
|
||||||
+# along with this program; if not, write to the Free Software
|
|
||||||
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
+
|
|
||||||
+# Exit of the thread group leader should not break GDB.
|
|
||||||
+
|
|
||||||
+# This file was written by Jan Kratochvil <jan.kratochvil@redhat.com>.
|
|
||||||
+
|
|
||||||
+if $tracelevel then {
|
|
||||||
+ strace $tracelevel
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+set testfile "leader-exit"
|
|
||||||
+set srcfile ${testfile}.c
|
|
||||||
+set binfile ${objdir}/${subdir}/${testfile}
|
|
||||||
+
|
|
||||||
+if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
|
|
||||||
+ return -1
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+gdb_exit
|
|
||||||
+gdb_start
|
|
||||||
+gdb_reinitialize_dir $srcdir/$subdir
|
|
||||||
+gdb_load ${binfile}
|
|
||||||
+gdb_run_cmd
|
|
||||||
+
|
|
||||||
+proc stop_process { description } {
|
|
||||||
+ global gdb_prompt
|
|
||||||
+
|
|
||||||
+ # For this to work we must be sure to consume the "Continuing."
|
|
||||||
+ # message first, or GDB's signal handler may not be in place.
|
|
||||||
+ after 1000 {send_gdb "\003"}
|
|
||||||
+ gdb_expect {
|
|
||||||
+ -re "Program received signal SIGINT.*$gdb_prompt $"
|
|
||||||
+ {
|
|
||||||
+ pass $description
|
|
||||||
+ }
|
|
||||||
+ timeout
|
|
||||||
+ {
|
|
||||||
+ fail "$description (timeout)"
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+# Prevent races.
|
|
||||||
+sleep 8
|
|
||||||
+
|
|
||||||
+stop_process "Threads could be stopped"
|
|
||||||
+
|
|
||||||
+gdb_test "info threads" \
|
|
||||||
+ "\\* 2 Thread \[^\r\n\]* in \[^\r\n\]*" \
|
|
||||||
+ "Single thread has been left"
|
|
|
@ -1,216 +0,0 @@
|
||||||
Test GCORE on 32bit inferiors on 64bit platforms.
|
|
||||||
|
|
||||||
UNSUPPORTED results are valid for `-m64' on 32bit targets.
|
|
||||||
|
|
||||||
|
|
||||||
Index: gdb-6.8/gdb/testsuite/gdb.base/gcore.exp
|
|
||||||
===================================================================
|
|
||||||
--- gdb-6.8.orig/gdb/testsuite/gdb.base/gcore.exp 2008-01-01 23:53:19.000000000 +0100
|
|
||||||
+++ gdb-6.8/gdb/testsuite/gdb.base/gcore.exp 2008-07-14 10:28:05.000000000 +0200
|
|
||||||
@@ -30,9 +30,14 @@ set testfile "gcore"
|
|
||||||
set srcfile ${testfile}.c
|
|
||||||
set binfile ${objdir}/${subdir}/${testfile}
|
|
||||||
|
|
||||||
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
|
|
||||||
- untested gcore.exp
|
|
||||||
- return -1
|
|
||||||
+# `-static-libgcc' to avoid dependency on `libgcc.{i386,ppc}'.
|
|
||||||
+foreach additional_flags {{} {-m32 -static-libgcc} {-m64 -static-libgcc}} {
|
|
||||||
+
|
|
||||||
+set prefix "arch{$additional_flags}:"
|
|
||||||
+
|
|
||||||
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug additional_flags=$additional_flags]] != "" } {
|
|
||||||
+ unsupported "${prefix} gcore.exp"
|
|
||||||
+ continue
|
|
||||||
}
|
|
||||||
|
|
||||||
# Start with a fresh gdb.
|
|
||||||
@@ -47,23 +52,23 @@ send_gdb "help gcore\n"
|
|
||||||
gdb_expect {
|
|
||||||
-re "Undefined command: .gcore.*$gdb_prompt $" {
|
|
||||||
# gcore command not supported -- nothing to test here.
|
|
||||||
- unsupported "gdb does not support gcore on this target"
|
|
||||||
- return -1;
|
|
||||||
+ unsupported "${prefix} gdb does not support gcore on this target"
|
|
||||||
+ continue
|
|
||||||
}
|
|
||||||
-re "Save a core file .*$gdb_prompt $" {
|
|
||||||
- pass "help gcore"
|
|
||||||
+ pass "${prefix} help gcore"
|
|
||||||
}
|
|
||||||
-re ".*$gdb_prompt $" {
|
|
||||||
- fail "help gcore"
|
|
||||||
+ fail "${prefix} help gcore"
|
|
||||||
}
|
|
||||||
timeout {
|
|
||||||
- fail "help gcore (timeout)"
|
|
||||||
+ fail "${prefix} help gcore (timeout)"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if { ! [ runto_main ] } then {
|
|
||||||
- untested gcore.exp
|
|
||||||
- return -1
|
|
||||||
+ untested "${prefix} gcore.exp"
|
|
||||||
+ continue
|
|
||||||
}
|
|
||||||
|
|
||||||
proc capture_command_output { command prefix } {
|
|
||||||
@@ -77,7 +82,7 @@ proc capture_command_output { command pr
|
|
||||||
set output_string $expect_out(1,string)
|
|
||||||
}
|
|
||||||
default {
|
|
||||||
- fail "capture_command_output failed on $command."
|
|
||||||
+ fail "${prefix} capture_command_output failed on $command."
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return $output_string
|
|
||||||
@@ -109,22 +114,22 @@ set escapedfilename [string_to_regexp ${
|
|
||||||
|
|
||||||
set core_supported 0
|
|
||||||
gdb_test_multiple "gcore ${objdir}/${subdir}/gcore.test" \
|
|
||||||
- "save a corefile" \
|
|
||||||
+ "${prefix} save a corefile" \
|
|
||||||
{
|
|
||||||
-re "Saved corefile ${escapedfilename}\[\r\n\]+$gdb_prompt $" {
|
|
||||||
- pass "save a corefile"
|
|
||||||
+ pass "${prefix} save a corefile"
|
|
||||||
global core_supported
|
|
||||||
set core_supported 1
|
|
||||||
}
|
|
||||||
-re "Can't create a corefile\[\r\n\]+$gdb_prompt $" {
|
|
||||||
- unsupported "save a corefile"
|
|
||||||
+ unsupported "${prefix} save a corefile"
|
|
||||||
global core_supported
|
|
||||||
set core_supported 0
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if {!$core_supported} {
|
|
||||||
- return -1
|
|
||||||
+ continue
|
|
||||||
}
|
|
||||||
|
|
||||||
# Now restart gdb and load the corefile.
|
|
||||||
@@ -136,31 +141,31 @@ gdb_load ${binfile}
|
|
||||||
send_gdb "core ${objdir}/${subdir}/gcore.test\n"
|
|
||||||
gdb_expect {
|
|
||||||
-re ".* is not a core dump:.*$gdb_prompt $" {
|
|
||||||
- fail "re-load generated corefile (bad file format)"
|
|
||||||
+ fail "${prefix} re-load generated corefile (bad file format)"
|
|
||||||
# No use proceeding from here.
|
|
||||||
- return;
|
|
||||||
+ continue
|
|
||||||
}
|
|
||||||
-re ".*: No such file or directory.*$gdb_prompt $" {
|
|
||||||
- fail "re-load generated corefile (file not found)"
|
|
||||||
+ fail "${prefix} re-load generated corefile (file not found)"
|
|
||||||
# No use proceeding from here.
|
|
||||||
- return;
|
|
||||||
+ continue
|
|
||||||
}
|
|
||||||
-re ".*Couldn't find .* registers in core file.*$gdb_prompt $" {
|
|
||||||
- fail "re-load generated corefile (incomplete note section)"
|
|
||||||
+ fail "${prefix} re-load generated corefile (incomplete note section)"
|
|
||||||
}
|
|
||||||
-re "Core was generated by .*$gdb_prompt $" {
|
|
||||||
- pass "re-load generated corefile"
|
|
||||||
+ pass "${prefix} re-load generated corefile"
|
|
||||||
}
|
|
||||||
-re ".*$gdb_prompt $" {
|
|
||||||
- fail "re-load generated corefile"
|
|
||||||
+ fail "${prefix} re-load generated corefile"
|
|
||||||
}
|
|
||||||
timeout {
|
|
||||||
- fail "re-load generated corefile (timeout)"
|
|
||||||
+ fail "${prefix} re-load generated corefile (timeout)"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
send_gdb "where\n"
|
|
||||||
-gdb_expect_list "where in corefile" ".*$gdb_prompt $" {
|
|
||||||
+gdb_expect_list "${prefix} where in corefile" ".*$gdb_prompt $" {
|
|
||||||
".*\[\r\n\]+#0 .* terminal_func \\(\\) at "
|
|
||||||
".*\[\r\n\]+#1 .* array_func \\(\\) at "
|
|
||||||
".*\[\r\n\]+#2 .* factorial_func \\(value=1\\) at "
|
|
||||||
@@ -174,61 +179,64 @@ gdb_expect_list "where in corefile" ".*$
|
|
||||||
|
|
||||||
set post_corefile_regs [capture_command_output "info registers" ""]
|
|
||||||
if ![string compare $pre_corefile_regs $post_corefile_regs] then {
|
|
||||||
- pass "corefile restored general registers"
|
|
||||||
+ pass "${prefix} corefile restored general registers"
|
|
||||||
} else {
|
|
||||||
- fail "corefile restored general registers"
|
|
||||||
+ fail "${prefix} corefile restored general registers"
|
|
||||||
}
|
|
||||||
|
|
||||||
set post_corefile_allregs [capture_command_output "info all-reg" ""]
|
|
||||||
if ![string compare $pre_corefile_allregs $post_corefile_allregs] then {
|
|
||||||
- pass "corefile restored all registers"
|
|
||||||
+ pass "${prefix} corefile restored all registers"
|
|
||||||
} else {
|
|
||||||
- fail "corefile restored all registers"
|
|
||||||
+ fail "${prefix} corefile restored all registers"
|
|
||||||
}
|
|
||||||
|
|
||||||
set post_corefile_extern_array \
|
|
||||||
[capture_command_output "print extern_array" "$print_prefix"]
|
|
||||||
if ![string compare $pre_corefile_extern_array $post_corefile_extern_array] {
|
|
||||||
- pass "corefile restored extern array"
|
|
||||||
+ pass "${prefix} corefile restored extern array"
|
|
||||||
} else {
|
|
||||||
- fail "corefile restored extern array"
|
|
||||||
+ fail "${prefix} corefile restored extern array"
|
|
||||||
}
|
|
||||||
|
|
||||||
set post_corefile_static_array \
|
|
||||||
[capture_command_output "print static_array" "$print_prefix"]
|
|
||||||
if ![string compare $pre_corefile_static_array $post_corefile_static_array] {
|
|
||||||
- pass "corefile restored static array"
|
|
||||||
+ pass "${prefix} corefile restored static array"
|
|
||||||
} else {
|
|
||||||
- fail "corefile restored static array"
|
|
||||||
+ fail "${prefix} corefile restored static array"
|
|
||||||
}
|
|
||||||
|
|
||||||
set post_corefile_uninit_array \
|
|
||||||
[capture_command_output "print un_initialized_array" "$print_prefix"]
|
|
||||||
if ![string compare $pre_corefile_uninit_array $post_corefile_uninit_array] {
|
|
||||||
- pass "corefile restored un-initialized array"
|
|
||||||
+ pass "${prefix} corefile restored un-initialized array"
|
|
||||||
} else {
|
|
||||||
- fail "corefile restored un-initialized array"
|
|
||||||
+ fail "${prefix} corefile restored un-initialized array"
|
|
||||||
}
|
|
||||||
|
|
||||||
set post_corefile_heap_string \
|
|
||||||
[capture_command_output "print heap_string" "$print_prefix"]
|
|
||||||
if ![string compare $pre_corefile_heap_string $post_corefile_heap_string] {
|
|
||||||
- pass "corefile restored heap array"
|
|
||||||
+ pass "${prefix} corefile restored heap array"
|
|
||||||
} else {
|
|
||||||
- fail "corefile restored heap array"
|
|
||||||
+ fail "${prefix} corefile restored heap array"
|
|
||||||
}
|
|
||||||
|
|
||||||
set post_corefile_local_array \
|
|
||||||
[capture_command_output "print array_func::local_array" "$print_prefix"]
|
|
||||||
if ![string compare $pre_corefile_local_array $post_corefile_local_array] {
|
|
||||||
- pass "corefile restored stack array"
|
|
||||||
+ pass "${prefix} corefile restored stack array"
|
|
||||||
} else {
|
|
||||||
- fail "corefile restored stack array"
|
|
||||||
+ fail "${prefix} corefile restored stack array"
|
|
||||||
}
|
|
||||||
|
|
||||||
set post_corefile_backtrace [capture_command_output "backtrace" ""]
|
|
||||||
if ![string compare $pre_corefile_backtrace $post_corefile_backtrace] {
|
|
||||||
- pass "corefile restored backtrace"
|
|
||||||
+ pass "${prefix} corefile restored backtrace"
|
|
||||||
} else {
|
|
||||||
- fail "corefile restored backtrace"
|
|
||||||
+ fail "${prefix} corefile restored backtrace"
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+# $additional_flags:
|
|
||||||
}
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue