- {
- /* Sections are at the same address. This could happen if
- A) we have an objfile and a separate debuginfo.
- B) we are confused, and have added sections without proper relocation,
- or something like that. */
-
- const struct objfile *const objfile1 = sect1->objfile;
- const struct objfile *const objfile2 = sect2->objfile;
-
- if (objfile1->separate_debug_objfile == objfile2
- || objfile2->separate_debug_objfile == objfile1)
- {
- /* Case A. The ordering doesn't matter: separate debuginfo files
- will be filtered out later. */
-
- return 0;
- }
-
- /* Case B. Maintain stable sort order, so bugs in GDB are easier to
- triage. This section could be slow (since we iterate over all
- objfiles in each call to qsort_cmp), but this shouldn't happen
- very often (GDB is already in a confused state; one hopes this
- doesn't happen at all). If you discover that significant time is
- spent in the loops below, do 'set complaints 100' and examine the
- resulting complaints. */
-
- if (objfile1 == objfile2)
- {
- /* Both sections came from the same objfile. We are really confused.
- Sort on sequence order of sections within the objfile. */
-
- const struct obj_section *osect;
-
- ALL_OBJFILE_OSECTIONS (objfile1, osect)
- if (osect == sect1)
- return -1;
- else if (osect == sect2)
- return 1;
-
- /* We should have found one of the sections before getting here. */
- gdb_assert (0);
- }
- else
- {
- /* Sort on sequence number of the objfile in the chain. */
-
- const struct objfile *objfile;
-
- ALL_OBJFILES (objfile)
- if (objfile == objfile1)
- return -1;
- else if (objfile == objfile2)
- return 1;
-
- /* We should have found one of the objfiles before getting here. */
- gdb_assert (0);
- }
-
- }
+ {
+ /* Sections are at the same address. This could happen if
+ A) we have an objfile and a separate debuginfo.
+ B) we are confused, and have added sections without proper relocation,
+ or something like that. */
+
+ const struct objfile *const objfile1 = sect1->objfile;
+ const struct objfile *const objfile2 = sect2->objfile;
+
+ if (objfile1->separate_debug_objfile == objfile2
+ || objfile2->separate_debug_objfile == objfile1)
+ {
+ /* Case A. The ordering doesn't matter: separate debuginfo files
+ will be filtered out later. */
+
+ return 0;
+ }
+
+ /* Case B. Maintain stable sort order, so bugs in GDB are easier to
+ triage. This section could be slow (since we iterate over all
+ objfiles in each call to qsort_cmp), but this shouldn't happen
+ very often (GDB is already in a confused state; one hopes this
+ doesn't happen at all). If you discover that significant time is
+ spent in the loops below, do 'set complaints 100' and examine the
+ resulting complaints. */
+
+ if (objfile1 == objfile2)
+ {
+ /* Both sections came from the same objfile. We are really confused.
+ Sort on sequence order of sections within the objfile. */
+
+ const struct obj_section *osect;
+
+ ALL_OBJFILE_OSECTIONS (objfile1, osect)
+ if (osect == sect1)
+ return -1;
+ else if (osect == sect2)
+ return 1;
+
+ /* We should have found one of the sections before getting here. */
+ gdb_assert_not_reached ("section not found");
+ }
+ else
+ {
+ /* Sort on sequence number of the objfile in the chain. */
+
+ const struct objfile *objfile;
+
+ ALL_OBJFILES (objfile)
+ if (objfile == objfile1)
+ return -1;
+ else if (objfile == objfile2)
+ return 1;
+
+ /* We should have found one of the objfiles before getting here. */
+ gdb_assert_not_reached ("objfile not found");
+ }
+ }