]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
fix line format
authorAaron Merey <amerey@redhat.com>
Fri, 21 Feb 2020 01:04:07 +0000 (20:04 -0500)
committerAaron Merey <amerey@redhat.com>
Fri, 21 Feb 2020 01:04:07 +0000 (20:04 -0500)
gdb/configure
gdb/configure.ac
gdb/debuginfod-support.c
gdb/debuginfod-support.h
gdb/dwarf2read.c
gdb/elfread.c
gdb/source.c
gdb/testsuite/gdb.debuginfod/fetch_src_and_symbols.exp

index cdacc1dd8e470c08aa6b54475eaa6e1f0b7c3f46..6286e9ea650ea4ed64e5288ce0c2719bac6f8224 100755 (executable)
@@ -6897,18 +6897,18 @@ $as_echo "#define HAVE_LIBDEBUGINFOD 1" >>confdefs.h
 
     else
       if test "x$with_debuginfod" = xyes; then
-        as_fn_error $? "\"--with-debuginfod was given, but libdebuginfod is missing or unusable.\"" "$LINENO" 5
+       as_fn_error $? "\"--with-debuginfod was given, but libdebuginfod is missing or unusable.\"" "$LINENO" 5
       else
-        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libdebuginfod is missing or unusable; some features may be unavailable." >&5
+       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libdebuginfod is missing or unusable; some features may be unavailable." >&5
 $as_echo "$as_me: WARNING: libdebuginfod is missing or unusable; some features may be unavailable." >&2;}
       fi
     fi
   else
     if test "x$with_debuginfod" = xyes; then
-      as_fn_error $? "pkg-config missing or unusable; cannot find libdebuginfod" "$LINENO" 5
+      as_fn_error $? "--with-debuginfod was given, but pkg-config missing or unusable; cannot find libdebuginfod" "$LINENO" 5
     else
-      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config missing or unusable; cannot find libdebuginfod" >&5
-$as_echo "$as_me: WARNING: pkg-config missing or unusable; cannot find libdebuginfod" >&2;}
+      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config missing or unusable; debuginfod support disabled." >&5
+$as_echo "$as_me: WARNING: pkg-config missing or unusable; debuginfod support disabled." >&2;}
     fi
   fi
 else
index e9b31339402f5c2343fea313c91caf6d4d100659..dd55f4418b91cb7aa4b4cc297582e0adb4b2f652 100644 (file)
@@ -340,9 +340,9 @@ if test "x$with_debuginfod" != xno; then
       AC_DEFINE([HAVE_LIBDEBUGINFOD], [1], [Define to 1 if debuginfod is enabled.])
     else
       if test "x$with_debuginfod" = xyes; then
-        AC_MSG_ERROR(["--with-debuginfod was given, but libdebuginfod is missing or unusable."])
+       AC_MSG_ERROR(["--with-debuginfod was given, but libdebuginfod is missing or unusable."])
       else
-        AC_MSG_WARN([libdebuginfod is missing or unusable; some features may be unavailable.])
+       AC_MSG_WARN([libdebuginfod is missing or unusable; some features may be unavailable.])
       fi
     fi
   else
index 2c2e7b717ea02ab5f43d48333233fe8180d8cd24..7d075e0d4ac746556c5c02dc072c5fb94f09923c 100644 (file)
 #ifndef HAVE_LIBDEBUGINFOD
 scoped_fd
 debuginfod_source_query (const unsigned char *build_id __attribute__((unused)),
-                         int build_id_len __attribute__((unused)),
-                         const char *srcpath __attribute__((unused)),
-                         gdb::unique_xmalloc_ptr<char> *filename __attribute__((unused)))
+                        int build_id_len __attribute__((unused)),
+                        const char *srcpath __attribute__((unused)),
+                        gdb::unique_xmalloc_ptr<char> *filename __attribute__((unused)))
 {
   return scoped_fd (-ENOSYS);
 }
 
 scoped_fd
 debuginfod_debuginfo_query (const unsigned char *build_id __attribute__((unused)),
-                            int build_id_len __attribute__((unused)),
-                            gdb::unique_xmalloc_ptr<char> *filename __attribute__((unused)))
+                           int build_id_len __attribute__((unused)),
+                           gdb::unique_xmalloc_ptr<char> *filename __attribute__((unused)))
 {
   return scoped_fd (-ENOSYS);
 }
@@ -51,9 +51,9 @@ progressfn (debuginfod_client *c, long cur, long total)
     }
 
   printf_unfiltered ("Downloading... %.0f%% (%ld/%ld)%s",
-                     (cur * 100.0f) / total,
-                     cur, total,
-                     (cur == total) ? "\n" : "\r");
+                    (cur * 100.0f) / total,
+                    cur, total,
+                    (cur == total) ? "\n" : "\r");
   return 0;
 }
 
@@ -72,9 +72,9 @@ debuginfod_init ()
 
 scoped_fd
 debuginfod_source_query (const unsigned char *build_id,
-                         int build_id_len,
-                         const char *srcpath,
-                         gdb::unique_xmalloc_ptr<char> *destname)
+                        int build_id_len,
+                        const char *srcpath,
+                         gdb::unique_xmalloc_ptr<char> *destname)
 {
   debuginfod_client *c = debuginfod_init ();
 
@@ -85,18 +85,17 @@ debuginfod_source_query (const unsigned char *build_id,
 
   printf_unfiltered ("Attempting to download source file %s\n", srcpath);
   scoped_fd fd (debuginfod_find_source (c,
-                                        build_id,
-                                        build_id_len,
-                                        srcpath,
-                                        &dname));
+                                       build_id,
+                                       build_id_len,
+                                       srcpath,
+                                       &dname));
 
   if (fd.get () < 0)
     printf_unfiltered ("Download unsuccessful. Continuing without source file %s.\n",
-                       srcpath);
+                      srcpath);
   else
     printf_unfiltered ("Download successful.\n");
 
-
   destname->reset (dname);
   debuginfod_end (c);
 
@@ -107,9 +106,9 @@ debuginfod_source_query (const unsigned char *build_id,
 
 scoped_fd
 debuginfod_debuginfo_query (const unsigned char *build_id,
-                            int build_id_len,
-                            const char *filename,
-                            gdb::unique_xmalloc_ptr<char> *destname)
+                           int build_id_len,
+                           const char *filename,
+                           gdb::unique_xmalloc_ptr<char> *destname)
 {
   debuginfod_client *c = debuginfod_init ();
 
@@ -123,7 +122,7 @@ debuginfod_debuginfo_query (const unsigned char *build_id,
 
   if (fd.get () < 0)
     printf_unfiltered ("Download unsuccessful. Continuing without debug info for %s.\n",
-                       filename);
+                      filename);
   else
     printf_unfiltered ("Download successful.\n");
 
index b08dd000bfd3008acb5a44aae47f2bdd43e9a3bc..2e500a99f3da856995a12e80d22a073324f8bcc6 100644 (file)
@@ -37,9 +37,9 @@
 
 extern scoped_fd
 debuginfod_source_query (const unsigned char *build_id,
-                         int build_id_len,
-                         const char *src_path,
-                         gdb::unique_xmalloc_ptr<char> *destname);
+                        int build_id_len,
+                         const char *src_path,
+                         gdb::unique_xmalloc_ptr<char> *destname);
 
 /* Query debuginfod servers for a debuginfo file with BUILD_ID.
    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,
 
 extern scoped_fd
 debuginfod_debuginfo_query (const unsigned char *build_id,
-                            int build_id_len,
-                            const char *filename,
-                            gdb::unique_xmalloc_ptr<char> *destname);
+                           int build_id_len,
+                           const char *filename,
+                           gdb::unique_xmalloc_ptr<char> *destname);
 
 #endif /* DEBUGINFOD_SUPPORT_H */
index 51526bc16deef73483c37d1ac970f0ef8be7a53c..595e021701183b8a2a0660341664c5deefb2030d 100644 (file)
@@ -2753,19 +2753,19 @@ dwarf2_get_dwz_file (struct dwarf2_per_objfile *dwarf2_per_objfile)
       const char *origname = dwarf2_per_objfile->objfile->original_name;
 
       scoped_fd fd (debuginfod_debuginfo_query (buildid,
-                                                buildid_len,
-                                                origname,
-                                                &alt_filename));
+                                               buildid_len,
+                                               origname,
+                                               &alt_filename));
 
       if (fd.get () >= 0)
-        {
-          /* File successfully retrieved from server.  */
-          dwz_bfd = gdb_bfd_open (alt_filename.get (), gnutarget, -1);
+       {
+          /* File successfully retrieved from server.  */
+          dwz_bfd = gdb_bfd_open (alt_filename.get (), gnutarget, -1);
 
-          if (dwz_bfd != nullptr
-              && !build_id_verify (dwz_bfd.get (), buildid_len, buildid))
-            dwz_bfd.reset (nullptr);
-        }
+         if (dwz_bfd != nullptr
+             && !build_id_verify (dwz_bfd.get (), buildid_len, buildid))
+           dwz_bfd.reset (nullptr);
+       }
     }
 
   if (dwz_bfd == NULL)
index 58e259983b048aafe6b31bf331db78e84b3bd3c2..f86c9548bea96638f72f32b12a777f3aa8c53763 100644 (file)
@@ -1319,33 +1319,33 @@ elf_symfile_read (struct objfile *objfile, symfile_add_flags symfile_flags)
                                    symfile_flags, objfile);
        }
       else
-        {
-          has_dwarf2 = false;
-          const struct bfd_build_id *build_id = build_id_bfd_get (objfile->obfd);
-
-          if (build_id != nullptr)
-            {
-              gdb::unique_xmalloc_ptr<char> symfile_path;
-              scoped_fd fd (debuginfod_debuginfo_query (build_id->data,
-                                                        build_id->size,
-                                                        objfile->original_name,
-                                                        &symfile_path));
-
-              if (fd.get () >= 0)
-                {
-                  /* File successfully retrieved from server.  */
-                  gdb_bfd_ref_ptr debug_bfd (symfile_bfd_open (symfile_path.get ()));
-
-                  if (debug_bfd != nullptr
-                      && build_id_verify (debug_bfd.get (), build_id->size, build_id->data))
-                    {
-                      symbol_file_add_separate (debug_bfd.get (), symfile_path.get (),
-                                                symfile_flags, objfile);
-                      has_dwarf2 = true;
-                    }
-                }
-            }
-        }
+       {
+         has_dwarf2 = false;
+         const struct bfd_build_id *build_id = build_id_bfd_get (objfile->obfd);
+
+         if (build_id != nullptr)
+           {
+             gdb::unique_xmalloc_ptr<char> symfile_path;
+             scoped_fd fd (debuginfod_debuginfo_query (build_id->data,
+                                                       build_id->size,
+                                                       objfile->original_name,
+                                                       &symfile_path));
+
+             if (fd.get () >= 0)
+               {
+                 /* File successfully retrieved from server.  */
+                 gdb_bfd_ref_ptr debug_bfd (symfile_bfd_open (symfile_path.get ()));
+
+                 if (debug_bfd != nullptr
+                     && build_id_verify (debug_bfd.get (), build_id->size, build_id->data))
+                   {
+                     symbol_file_add_separate (debug_bfd.get (), symfile_path.get (),
+                                               symfile_flags, objfile);
+                      has_dwarf2 = true;
+                   }
+               }
+           }
+       }
     }
 
   /* Read the CTF section only if there is no DWARF info.  */
index 77a8f42a8204d65fd744303742ca7c55d4209148..7f519345bb0fab0bafb6cf8900463693454a8b62 100644 (file)
@@ -1159,28 +1159,28 @@ open_source_file (struct symtab *s)
   if (fd.get () < 0)
     {
       if (SYMTAB_COMPUNIT (s) != nullptr)
-        {
-          const objfile *ofp = COMPUNIT_OBJFILE (SYMTAB_COMPUNIT (s));
-
-          std::string srcpath;
-          if (IS_ABSOLUTE_PATH (s->filename))
-            srcpath = s->filename;
-          else
-            {
-              srcpath = SYMTAB_DIRNAME (s);
-              srcpath += SLASH_STRING;
-              srcpath += s->filename;
-            }
-
-          const struct bfd_build_id *build_id = build_id_bfd_get (ofp->obfd);
-
-          /* Query debuginfod for the source file.  */
-          if (build_id != nullptr)
-            fd = debuginfod_source_query (build_id->data,
-                                          build_id->size,
-                                          srcpath.c_str (),
-                                          &fullname);
-        }
+       {
+         const objfile *ofp = COMPUNIT_OBJFILE (SYMTAB_COMPUNIT (s));
+
+         std::string srcpath;
+         if (IS_ABSOLUTE_PATH (s->filename))
+           srcpath = s->filename;
+         else
+           {
+             srcpath = SYMTAB_DIRNAME (s);
+             srcpath += SLASH_STRING;
+             srcpath += s->filename;
+           }
+
+         const struct bfd_build_id *build_id = build_id_bfd_get (ofp->obfd);
+
+         /* Query debuginfod for the source file.  */
+         if (build_id != nullptr)
+           fd = debuginfod_source_query (build_id->data,
+                                         build_id->size,
+                                         srcpath.c_str (),
+                                         &fullname);
+       }
     }
 
   s->fullname = fullname.release ();
index 0b1fac210d1b7e9cb63fd1648eef0944b6ec88ee..0bf18f2d124d8facc500416098c5f478cbdcff4d 100644 (file)
@@ -47,7 +47,7 @@ set outputdir [standard_output_file {}]
 
 # Make a copy source file that we can move around
 if { [catch {file copy -force ${srcdir}/${subdir}/${srcfile} \
-              [standard_output_file ${sourcetmp}]}] != 0 } {
+            [standard_output_file ${sourcetmp}]}] != 0 } {
     error "create temporary file"
     return -1
 }
@@ -88,17 +88,17 @@ proc write_just_debugaltlink {filename dwzname buildid} {
     set asm_file [standard_output_file $filename]
 
     Dwarf::assemble $asm_file {
-        upvar dwzname dwzname
-        upvar buildid buildid
+       upvar dwzname dwzname
+       upvar buildid buildid
 
-        gnu_debugaltlink $dwzname $buildid
+       gnu_debugaltlink $dwzname $buildid
 
-        # Only the DWARF reader checks .gnu_debugaltlink, so make sure
-        # there is a bit of DWARF in here.
-        cu {} {
-            compile_unit {{language @DW_LANG_C}} {
-            }
-        }
+       # Only the DWARF reader checks .gnu_debugaltlink, so make sure
+       # there is a bit of DWARF in here.
+       cu {} {
+           compile_unit {{language @DW_LANG_C}} {
+           }
+       }
     }
 }
 
@@ -108,28 +108,28 @@ proc write_dwarf_file {filename buildid {value 99}} {
     set asm_file [standard_output_file $filename]
 
     Dwarf::assemble $asm_file {
-        declare_labels int_label int_label2
-
-        upvar buildid buildid
-        upvar value value
-
-        build_id $buildid
-
-        cu {} {
-            compile_unit {{language @DW_LANG_C}} {
-                int_label2: base_type {
-                    {name int}
-                    {byte_size 4 sdata}
-                    {encoding @DW_ATE_signed}
-                }
-
-                constant {
-                    {name the_int}
-                    {type :$int_label2}
-                    {const_value $value data1}
-                }
-            }
-        }
+       declare_labels int_label int_label2
+
+       upvar buildid buildid
+       upvar value value
+
+       build_id $buildid
+
+       cu {} {
+           compile_unit {{language @DW_LANG_C}} {
+               int_label2: base_type {
+                   {name int}
+                   {byte_size 4 sdata}
+                   {encoding @DW_ATE_signed}
+               }
+
+               constant {
+                   {name the_int}
+                   {type :$int_label2}
+                   {const_value $value data1}
+               }
+           }
+       }
     }
 }
 
@@ -176,9 +176,9 @@ while { ! $found } {
 }
 
 set metrics [list "ready 1" \
-             "thread_work_total{role=\"traverse\"} 1" \
-             "thread_work_pending{role=\"scan\"} 0" \
-             "thread_busy{role=\"scan\"} 0"]
+            "thread_work_total{role=\"traverse\"} 1" \
+            "thread_work_pending{role=\"scan\"} 0" \
+            "thread_busy{role=\"scan\"} 0"]
 
 # Check server metrics to confirm init has completed.
 foreach m $metrics {