-
Notifications
You must be signed in to change notification settings - Fork 7.9k
GDB: Python Exception <class 'TypeError'>: exceptions must derive from BaseException #15923
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
While I don't understand why PHP would throw a |
Its not a PHP type error, its a Python one - I boiled it down to a minimal reproduction case, but I was getting a lot of these (I just started using GDB for PHP) I see this is tagged as needing feedback - what more can I provide? |
The question is: why do you get a Python error when running/debugging PHP code? I think there is something wrong with your setup. |
I believe it is because the GDB stuff is written in python, see https://github.com/php/php-src/blob/1ce07b0957c9323e93c45d0a83c0133aa177a911/scripts/gdb/php_gdb.py |
The error likely comes from this line: php-src/scripts/gdb/php_gdb.py Line 304 in 1ce07b0
You can't raise a string. @DanielEScherzer Are you using a release build? That could explain why it can't find the symbol required. |
I didn't think I was, but running |
Yeah, I'll fix it. Looks like it's just on the master branch. |
…s must derive from BaseException Triggers on release builds when printing data structures. You can't raise a string, you must raise exceptions.
Ah, I hadn't noticed this yet. |
…s must derive from BaseException Triggers on release builds when printing data structures. You can't raise a string, you must raise exceptions.
Uh oh!
There was an error while loading. Please reload this page.
Description
The following code:
in
/var/www/html/test.php
. when run with GDB:Where var.c:113 at the time was
php-src/ext/standard/var.c
Line 113 in c65e042
Resulted in this output:
But I expected this output instead:
PHP Version
PHP 8.4-dev
The text was updated successfully, but these errors were encountered: