Add a quit to maint_print_all_sections
Checks
Context |
Check |
Description |
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 |
success
|
Build passed
|
linaro-tcwg-bot/tcwg_gdb_build--master-arm |
success
|
Build passed
|
linaro-tcwg-bot/tcwg_gdb_check--master-arm |
success
|
Test passed
|
linaro-tcwg-bot/tcwg_gdb_check--master-aarch64 |
fail
|
Patch failed to apply
|
Commit Message
If you have many sections, "maint print sections" can take a very long
time (due to a bug). If you happen to "c" at the pagination prompt,
this can't be interrupted. This patch adds a QUIT to the loop to at
least allow interruption.
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=32758
---
gdb/maint.c | 3 +++
1 file changed, 3 insertions(+)
Comments
On 3/6/25 12:19 PM, Tom Tromey wrote:
> If you have many sections, "maint print sections" can take a very long
> time (due to a bug). If you happen to "c" at the pagination prompt,
> this can't be interrupted. This patch adds a QUIT to the loop to at
> least allow interruption.
>
> Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=32758
This patch looks pretty simple, and like a good change. Reviewed-By:
Guinevere Larsen <guinevere@redhat.com>
>>>>> "Guinevere" == Guinevere Larsen <guinevere@redhat.com> writes:
Guinevere> This patch looks pretty simple, and like a good change. Reviewed-By:
Guinevere> Guinevere Larsen <guinevere@redhat.com>
Thanks. I'm going to check it in.
Tom
@@ -40,6 +40,7 @@
#include "gdbsupport/selftest.h"
#include "inferior.h"
#include "gdbsupport/thread-pool.h"
+#include "event-top.h"
#include "cli/cli-decode.h"
#include "cli/cli-utils.h"
@@ -373,6 +374,8 @@ maint_print_all_sections (const char *header, bfd *abfd, objfile *objfile,
for (asection *sect : gdb_bfd_sections (abfd))
{
+ QUIT;
+
obj_section *osect = nullptr;
if (objfile != nullptr)