From 69b9f23264b1c9156f9499125df96c69e9927f14 Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Wed, 27 Aug 2025 10:07:50 -0400 Subject: [PATCH] gdb/objfiles: add comment explaining when obj_section::the_bfd_section is nullptr Change-Id: Iae17492f468efba7b76463a6ff8526171e412040 Reviewed-By: Tom de Vries --- gdb/objfiles.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gdb/objfiles.h b/gdb/objfiles.h index bce85576e6c..da9d2f3f938 100644 --- a/gdb/objfiles.h +++ b/gdb/objfiles.h @@ -395,7 +395,9 @@ struct obj_section return addr >= this->addr () && addr < endaddr (); } - /* BFD section pointer */ + /* BFD section pointer. This is nullptr if the corresponding BFD section is + not allocatable (!SEC_ALLOC), in which case this obj_section can be + considered NULL / empty. */ struct bfd_section *the_bfd_section; /* Objfile this section is part of. */ -- 2.47.3