From: Simon Marchi Date: Wed, 27 Aug 2025 14:07:50 +0000 (-0400) Subject: gdb/objfiles: add comment explaining when obj_section::the_bfd_section is nullptr X-Git-Tag: gdb-17-branchpoint~145 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=69b9f23264b1c9156f9499125df96c69e9927f14;p=thirdparty%2Fbinutils-gdb.git gdb/objfiles: add comment explaining when obj_section::the_bfd_section is nullptr Change-Id: Iae17492f468efba7b76463a6ff8526171e412040 Reviewed-By: Tom de Vries --- 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. */