GNU Binutils with patches for OS216
修訂 | 6c29562bead03a191bfad3b2143d60d4f9a953d6 (tree) |
---|---|
時間 | 2020-02-21 10:04:07 |
作者 | Aaron Merey <amerey@redh...> |
Commiter | Aaron Merey |
fix line format
@@ -6897,18 +6897,18 @@ $as_echo "#define HAVE_LIBDEBUGINFOD 1" >>confdefs.h | ||
6897 | 6897 | |
6898 | 6898 | else |
6899 | 6899 | if test "x$with_debuginfod" = xyes; then |
6900 | - as_fn_error $? "\"--with-debuginfod was given, but libdebuginfod is missing or unusable.\"" "$LINENO" 5 | |
6900 | + as_fn_error $? "\"--with-debuginfod was given, but libdebuginfod is missing or unusable.\"" "$LINENO" 5 | |
6901 | 6901 | else |
6902 | - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libdebuginfod is missing or unusable; some features may be unavailable." >&5 | |
6902 | + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libdebuginfod is missing or unusable; some features may be unavailable." >&5 | |
6903 | 6903 | $as_echo "$as_me: WARNING: libdebuginfod is missing or unusable; some features may be unavailable." >&2;} |
6904 | 6904 | fi |
6905 | 6905 | fi |
6906 | 6906 | else |
6907 | 6907 | if test "x$with_debuginfod" = xyes; then |
6908 | - as_fn_error $? "pkg-config missing or unusable; cannot find libdebuginfod" "$LINENO" 5 | |
6908 | + as_fn_error $? "--with-debuginfod was given, but pkg-config missing or unusable; cannot find libdebuginfod" "$LINENO" 5 | |
6909 | 6909 | else |
6910 | - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config missing or unusable; cannot find libdebuginfod" >&5 | |
6911 | -$as_echo "$as_me: WARNING: pkg-config missing or unusable; cannot find libdebuginfod" >&2;} | |
6910 | + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config missing or unusable; debuginfod support disabled." >&5 | |
6911 | +$as_echo "$as_me: WARNING: pkg-config missing or unusable; debuginfod support disabled." >&2;} | |
6912 | 6912 | fi |
6913 | 6913 | fi |
6914 | 6914 | else |
@@ -340,9 +340,9 @@ if test "x$with_debuginfod" != xno; then | ||
340 | 340 | AC_DEFINE([HAVE_LIBDEBUGINFOD], [1], [Define to 1 if debuginfod is enabled.]) |
341 | 341 | else |
342 | 342 | if test "x$with_debuginfod" = xyes; then |
343 | - AC_MSG_ERROR(["--with-debuginfod was given, but libdebuginfod is missing or unusable."]) | |
343 | + AC_MSG_ERROR(["--with-debuginfod was given, but libdebuginfod is missing or unusable."]) | |
344 | 344 | else |
345 | - AC_MSG_WARN([libdebuginfod is missing or unusable; some features may be unavailable.]) | |
345 | + AC_MSG_WARN([libdebuginfod is missing or unusable; some features may be unavailable.]) | |
346 | 346 | fi |
347 | 347 | fi |
348 | 348 | else |
@@ -24,17 +24,17 @@ | ||
24 | 24 | #ifndef HAVE_LIBDEBUGINFOD |
25 | 25 | scoped_fd |
26 | 26 | debuginfod_source_query (const unsigned char *build_id __attribute__((unused)), |
27 | - int build_id_len __attribute__((unused)), | |
28 | - const char *srcpath __attribute__((unused)), | |
29 | - gdb::unique_xmalloc_ptr<char> *filename __attribute__((unused))) | |
27 | + int build_id_len __attribute__((unused)), | |
28 | + const char *srcpath __attribute__((unused)), | |
29 | + gdb::unique_xmalloc_ptr<char> *filename __attribute__((unused))) | |
30 | 30 | { |
31 | 31 | return scoped_fd (-ENOSYS); |
32 | 32 | } |
33 | 33 | |
34 | 34 | scoped_fd |
35 | 35 | debuginfod_debuginfo_query (const unsigned char *build_id __attribute__((unused)), |
36 | - int build_id_len __attribute__((unused)), | |
37 | - gdb::unique_xmalloc_ptr<char> *filename __attribute__((unused))) | |
36 | + int build_id_len __attribute__((unused)), | |
37 | + gdb::unique_xmalloc_ptr<char> *filename __attribute__((unused))) | |
38 | 38 | { |
39 | 39 | return scoped_fd (-ENOSYS); |
40 | 40 | } |
@@ -51,9 +51,9 @@ progressfn (debuginfod_client *c, long cur, long total) | ||
51 | 51 | } |
52 | 52 | |
53 | 53 | printf_unfiltered ("Downloading... %.0f%% (%ld/%ld)%s", |
54 | - (cur * 100.0f) / total, | |
55 | - cur, total, | |
56 | - (cur == total) ? "\n" : "\r"); | |
54 | + (cur * 100.0f) / total, | |
55 | + cur, total, | |
56 | + (cur == total) ? "\n" : "\r"); | |
57 | 57 | return 0; |
58 | 58 | } |
59 | 59 |
@@ -72,9 +72,9 @@ debuginfod_init () | ||
72 | 72 | |
73 | 73 | scoped_fd |
74 | 74 | debuginfod_source_query (const unsigned char *build_id, |
75 | - int build_id_len, | |
76 | - const char *srcpath, | |
77 | - gdb::unique_xmalloc_ptr<char> *destname) | |
75 | + int build_id_len, | |
76 | + const char *srcpath, | |
77 | + gdb::unique_xmalloc_ptr<char> *destname) | |
78 | 78 | { |
79 | 79 | debuginfod_client *c = debuginfod_init (); |
80 | 80 |
@@ -85,18 +85,17 @@ debuginfod_source_query (const unsigned char *build_id, | ||
85 | 85 | |
86 | 86 | printf_unfiltered ("Attempting to download source file %s\n", srcpath); |
87 | 87 | scoped_fd fd (debuginfod_find_source (c, |
88 | - build_id, | |
89 | - build_id_len, | |
90 | - srcpath, | |
91 | - &dname)); | |
88 | + build_id, | |
89 | + build_id_len, | |
90 | + srcpath, | |
91 | + &dname)); | |
92 | 92 | |
93 | 93 | if (fd.get () < 0) |
94 | 94 | printf_unfiltered ("Download unsuccessful. Continuing without source file %s.\n", |
95 | - srcpath); | |
95 | + srcpath); | |
96 | 96 | else |
97 | 97 | printf_unfiltered ("Download successful.\n"); |
98 | 98 | |
99 | - | |
100 | 99 | destname->reset (dname); |
101 | 100 | debuginfod_end (c); |
102 | 101 |
@@ -107,9 +106,9 @@ debuginfod_source_query (const unsigned char *build_id, | ||
107 | 106 | |
108 | 107 | scoped_fd |
109 | 108 | debuginfod_debuginfo_query (const unsigned char *build_id, |
110 | - int build_id_len, | |
111 | - const char *filename, | |
112 | - gdb::unique_xmalloc_ptr<char> *destname) | |
109 | + int build_id_len, | |
110 | + const char *filename, | |
111 | + gdb::unique_xmalloc_ptr<char> *destname) | |
113 | 112 | { |
114 | 113 | debuginfod_client *c = debuginfod_init (); |
115 | 114 |
@@ -123,7 +122,7 @@ debuginfod_debuginfo_query (const unsigned char *build_id, | ||
123 | 122 | |
124 | 123 | if (fd.get () < 0) |
125 | 124 | printf_unfiltered ("Download unsuccessful. Continuing without debug info for %s.\n", |
126 | - filename); | |
125 | + filename); | |
127 | 126 | else |
128 | 127 | printf_unfiltered ("Download successful.\n"); |
129 | 128 |
@@ -37,9 +37,9 @@ | ||
37 | 37 | |
38 | 38 | extern scoped_fd |
39 | 39 | debuginfod_source_query (const unsigned char *build_id, |
40 | - int build_id_len, | |
41 | - const char *src_path, | |
42 | - gdb::unique_xmalloc_ptr<char> *destname); | |
40 | + int build_id_len, | |
41 | + const char *src_path, | |
42 | + gdb::unique_xmalloc_ptr<char> *destname); | |
43 | 43 | |
44 | 44 | /* Query debuginfod servers for a debuginfo file with BUILD_ID. |
45 | 45 | BUILD_ID can be given as a binary blob or a null-terminated string. |
@@ -52,8 +52,8 @@ debuginfod_source_query (const unsigned char *build_id, | ||
52 | 52 | |
53 | 53 | extern scoped_fd |
54 | 54 | debuginfod_debuginfo_query (const unsigned char *build_id, |
55 | - int build_id_len, | |
56 | - const char *filename, | |
57 | - gdb::unique_xmalloc_ptr<char> *destname); | |
55 | + int build_id_len, | |
56 | + const char *filename, | |
57 | + gdb::unique_xmalloc_ptr<char> *destname); | |
58 | 58 | |
59 | 59 | #endif /* DEBUGINFOD_SUPPORT_H */ |
@@ -2753,19 +2753,19 @@ dwarf2_get_dwz_file (struct dwarf2_per_objfile *dwarf2_per_objfile) | ||
2753 | 2753 | const char *origname = dwarf2_per_objfile->objfile->original_name; |
2754 | 2754 | |
2755 | 2755 | scoped_fd fd (debuginfod_debuginfo_query (buildid, |
2756 | - buildid_len, | |
2757 | - origname, | |
2758 | - &alt_filename)); | |
2756 | + buildid_len, | |
2757 | + origname, | |
2758 | + &alt_filename)); | |
2759 | 2759 | |
2760 | 2760 | if (fd.get () >= 0) |
2761 | - { | |
2762 | - /* File successfully retrieved from server. */ | |
2763 | - dwz_bfd = gdb_bfd_open (alt_filename.get (), gnutarget, -1); | |
2761 | + { | |
2762 | + /* File successfully retrieved from server. */ | |
2763 | + dwz_bfd = gdb_bfd_open (alt_filename.get (), gnutarget, -1); | |
2764 | 2764 | |
2765 | - if (dwz_bfd != nullptr | |
2766 | - && !build_id_verify (dwz_bfd.get (), buildid_len, buildid)) | |
2767 | - dwz_bfd.reset (nullptr); | |
2768 | - } | |
2765 | + if (dwz_bfd != nullptr | |
2766 | + && !build_id_verify (dwz_bfd.get (), buildid_len, buildid)) | |
2767 | + dwz_bfd.reset (nullptr); | |
2768 | + } | |
2769 | 2769 | } |
2770 | 2770 | |
2771 | 2771 | if (dwz_bfd == NULL) |
@@ -1319,33 +1319,33 @@ elf_symfile_read (struct objfile *objfile, symfile_add_flags symfile_flags) | ||
1319 | 1319 | symfile_flags, objfile); |
1320 | 1320 | } |
1321 | 1321 | else |
1322 | - { | |
1323 | - has_dwarf2 = false; | |
1324 | - const struct bfd_build_id *build_id = build_id_bfd_get (objfile->obfd); | |
1325 | - | |
1326 | - if (build_id != nullptr) | |
1327 | - { | |
1328 | - gdb::unique_xmalloc_ptr<char> symfile_path; | |
1329 | - scoped_fd fd (debuginfod_debuginfo_query (build_id->data, | |
1330 | - build_id->size, | |
1331 | - objfile->original_name, | |
1332 | - &symfile_path)); | |
1333 | - | |
1334 | - if (fd.get () >= 0) | |
1335 | - { | |
1336 | - /* File successfully retrieved from server. */ | |
1337 | - gdb_bfd_ref_ptr debug_bfd (symfile_bfd_open (symfile_path.get ())); | |
1338 | - | |
1339 | - if (debug_bfd != nullptr | |
1340 | - && build_id_verify (debug_bfd.get (), build_id->size, build_id->data)) | |
1341 | - { | |
1342 | - symbol_file_add_separate (debug_bfd.get (), symfile_path.get (), | |
1343 | - symfile_flags, objfile); | |
1344 | - has_dwarf2 = true; | |
1345 | - } | |
1346 | - } | |
1347 | - } | |
1348 | - } | |
1322 | + { | |
1323 | + has_dwarf2 = false; | |
1324 | + const struct bfd_build_id *build_id = build_id_bfd_get (objfile->obfd); | |
1325 | + | |
1326 | + if (build_id != nullptr) | |
1327 | + { | |
1328 | + gdb::unique_xmalloc_ptr<char> symfile_path; | |
1329 | + scoped_fd fd (debuginfod_debuginfo_query (build_id->data, | |
1330 | + build_id->size, | |
1331 | + objfile->original_name, | |
1332 | + &symfile_path)); | |
1333 | + | |
1334 | + if (fd.get () >= 0) | |
1335 | + { | |
1336 | + /* File successfully retrieved from server. */ | |
1337 | + gdb_bfd_ref_ptr debug_bfd (symfile_bfd_open (symfile_path.get ())); | |
1338 | + | |
1339 | + if (debug_bfd != nullptr | |
1340 | + && build_id_verify (debug_bfd.get (), build_id->size, build_id->data)) | |
1341 | + { | |
1342 | + symbol_file_add_separate (debug_bfd.get (), symfile_path.get (), | |
1343 | + symfile_flags, objfile); | |
1344 | + has_dwarf2 = true; | |
1345 | + } | |
1346 | + } | |
1347 | + } | |
1348 | + } | |
1349 | 1349 | } |
1350 | 1350 | |
1351 | 1351 | /* Read the CTF section only if there is no DWARF info. */ |
@@ -1159,28 +1159,28 @@ open_source_file (struct symtab *s) | ||
1159 | 1159 | if (fd.get () < 0) |
1160 | 1160 | { |
1161 | 1161 | if (SYMTAB_COMPUNIT (s) != nullptr) |
1162 | - { | |
1163 | - const objfile *ofp = COMPUNIT_OBJFILE (SYMTAB_COMPUNIT (s)); | |
1164 | - | |
1165 | - std::string srcpath; | |
1166 | - if (IS_ABSOLUTE_PATH (s->filename)) | |
1167 | - srcpath = s->filename; | |
1168 | - else | |
1169 | - { | |
1170 | - srcpath = SYMTAB_DIRNAME (s); | |
1171 | - srcpath += SLASH_STRING; | |
1172 | - srcpath += s->filename; | |
1173 | - } | |
1174 | - | |
1175 | - const struct bfd_build_id *build_id = build_id_bfd_get (ofp->obfd); | |
1176 | - | |
1177 | - /* Query debuginfod for the source file. */ | |
1178 | - if (build_id != nullptr) | |
1179 | - fd = debuginfod_source_query (build_id->data, | |
1180 | - build_id->size, | |
1181 | - srcpath.c_str (), | |
1182 | - &fullname); | |
1183 | - } | |
1162 | + { | |
1163 | + const objfile *ofp = COMPUNIT_OBJFILE (SYMTAB_COMPUNIT (s)); | |
1164 | + | |
1165 | + std::string srcpath; | |
1166 | + if (IS_ABSOLUTE_PATH (s->filename)) | |
1167 | + srcpath = s->filename; | |
1168 | + else | |
1169 | + { | |
1170 | + srcpath = SYMTAB_DIRNAME (s); | |
1171 | + srcpath += SLASH_STRING; | |
1172 | + srcpath += s->filename; | |
1173 | + } | |
1174 | + | |
1175 | + const struct bfd_build_id *build_id = build_id_bfd_get (ofp->obfd); | |
1176 | + | |
1177 | + /* Query debuginfod for the source file. */ | |
1178 | + if (build_id != nullptr) | |
1179 | + fd = debuginfod_source_query (build_id->data, | |
1180 | + build_id->size, | |
1181 | + srcpath.c_str (), | |
1182 | + &fullname); | |
1183 | + } | |
1184 | 1184 | } |
1185 | 1185 | |
1186 | 1186 | s->fullname = fullname.release (); |
@@ -47,7 +47,7 @@ set outputdir [standard_output_file {}] | ||
47 | 47 | |
48 | 48 | # Make a copy source file that we can move around |
49 | 49 | if { [catch {file copy -force ${srcdir}/${subdir}/${srcfile} \ |
50 | - [standard_output_file ${sourcetmp}]}] != 0 } { | |
50 | + [standard_output_file ${sourcetmp}]}] != 0 } { | |
51 | 51 | error "create temporary file" |
52 | 52 | return -1 |
53 | 53 | } |
@@ -88,17 +88,17 @@ proc write_just_debugaltlink {filename dwzname buildid} { | ||
88 | 88 | set asm_file [standard_output_file $filename] |
89 | 89 | |
90 | 90 | Dwarf::assemble $asm_file { |
91 | - upvar dwzname dwzname | |
92 | - upvar buildid buildid | |
91 | + upvar dwzname dwzname | |
92 | + upvar buildid buildid | |
93 | 93 | |
94 | - gnu_debugaltlink $dwzname $buildid | |
94 | + gnu_debugaltlink $dwzname $buildid | |
95 | 95 | |
96 | - # Only the DWARF reader checks .gnu_debugaltlink, so make sure | |
97 | - # there is a bit of DWARF in here. | |
98 | - cu {} { | |
99 | - compile_unit {{language @DW_LANG_C}} { | |
100 | - } | |
101 | - } | |
96 | + # Only the DWARF reader checks .gnu_debugaltlink, so make sure | |
97 | + # there is a bit of DWARF in here. | |
98 | + cu {} { | |
99 | + compile_unit {{language @DW_LANG_C}} { | |
100 | + } | |
101 | + } | |
102 | 102 | } |
103 | 103 | } |
104 | 104 |
@@ -108,28 +108,28 @@ proc write_dwarf_file {filename buildid {value 99}} { | ||
108 | 108 | set asm_file [standard_output_file $filename] |
109 | 109 | |
110 | 110 | Dwarf::assemble $asm_file { |
111 | - declare_labels int_label int_label2 | |
112 | - | |
113 | - upvar buildid buildid | |
114 | - upvar value value | |
115 | - | |
116 | - build_id $buildid | |
117 | - | |
118 | - cu {} { | |
119 | - compile_unit {{language @DW_LANG_C}} { | |
120 | - int_label2: base_type { | |
121 | - {name int} | |
122 | - {byte_size 4 sdata} | |
123 | - {encoding @DW_ATE_signed} | |
124 | - } | |
125 | - | |
126 | - constant { | |
127 | - {name the_int} | |
128 | - {type :$int_label2} | |
129 | - {const_value $value data1} | |
130 | - } | |
131 | - } | |
132 | - } | |
111 | + declare_labels int_label int_label2 | |
112 | + | |
113 | + upvar buildid buildid | |
114 | + upvar value value | |
115 | + | |
116 | + build_id $buildid | |
117 | + | |
118 | + cu {} { | |
119 | + compile_unit {{language @DW_LANG_C}} { | |
120 | + int_label2: base_type { | |
121 | + {name int} | |
122 | + {byte_size 4 sdata} | |
123 | + {encoding @DW_ATE_signed} | |
124 | + } | |
125 | + | |
126 | + constant { | |
127 | + {name the_int} | |
128 | + {type :$int_label2} | |
129 | + {const_value $value data1} | |
130 | + } | |
131 | + } | |
132 | + } | |
133 | 133 | } |
134 | 134 | } |
135 | 135 |
@@ -176,9 +176,9 @@ while { ! $found } { | ||
176 | 176 | } |
177 | 177 | |
178 | 178 | set metrics [list "ready 1" \ |
179 | - "thread_work_total{role=\"traverse\"} 1" \ | |
180 | - "thread_work_pending{role=\"scan\"} 0" \ | |
181 | - "thread_busy{role=\"scan\"} 0"] | |
179 | + "thread_work_total{role=\"traverse\"} 1" \ | |
180 | + "thread_work_pending{role=\"scan\"} 0" \ | |
181 | + "thread_busy{role=\"scan\"} 0"] | |
182 | 182 | |
183 | 183 | # Check server metrics to confirm init has completed. |
184 | 184 | foreach m $metrics { |