]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Avoid crash with "NSString" literals
authorTom Tromey <tom@tromey.com>
Sun, 16 Nov 2025 17:29:40 +0000 (10:29 -0700)
committerTom Tromey <tom@tromey.com>
Tue, 2 Dec 2025 16:22:45 +0000 (09:22 -0700)
commit4062d79d63aef884ca69b92bd293c997fae142e7
treef9ae4d5234d8eb242838a87060f12976af94f8d0
parent55f723947e552cafd50db83acf45397a4593601b
Avoid crash with "NSString" literals

Evaluating an Objective-C "NSString" literal will cause gdb to crash.
This patch fixes the crash.

I think the result here still isn't correct -- I see a warning from
the runtime ("autorelease called without pool for object") with the
new code.

However, not crashing is an improvement on its own.

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=20501
gdb/c-exp.y
gdb/objc-lang.c
gdb/testsuite/gdb.objc/print.exp