This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] Make macOS build warning-free


>>>>> "Simon" == Simon Marchi <simon.marchi@ericsson.com> writes:

Simon> Indeed.  I started a prototype, it uncovered an issue about reread_symbol accessing
Simon> objfile::section_offsets out of bounds, so I'm stuck on that.

That sounds bad!

>> I think the symfile.c change isn't enough, btw; the
>> -Wno-deprecated-declarations bit is also required.  Otherwise there is at
>> least one error (about the use of syscall).  But maybe I could disable that
>> one with a #pragma instead - what do you think?

Simon> About this part, I would prefer if we disabled the warning at the call sites
Simon> instead of disabling the warning across the board, since the warning could be relevant
Simon> sometimes.  Or maybe we should look at using a non-deprecated alternative...

Simon> Here's the other patch I've been carrying.  If you think it's good, I can finish
Simon> it and push it, or you can steal it.

Simon> +	  DIAGNOSTIC_PUSH
Simon> +	  DIAGNOSTIC_IGNORE_DEPRECATED_DECLARATIONS
Simon>  	  res = syscall (SYS___pthread_kill, thread->gdb_port, nsignal);
Simon> +	  DIAGNOSTIC_POP

I like it but I wonder if it would work with ";" on those lines.
That would make indentation work more nicely in Emacs :)

Simon>  #ifdef HAVE_SBRK
Simon> +DIAGNOSTIC_PUSH
Simon> +DIAGNOSTIC_IGNORE_DEPRECATED_DECLARATIONS
Simon>    /* Set this before constructing scoped_command_stats.  */
Simon>    lim_at_start = (char *) sbrk (0);
Simon> +DIAGNOSTIC_POP
Simon>  #endif

Perhaps we need an sbrk wrapper so we can limit the damage to a single spot.

Tom


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]