Hello, guest. We have noticed that you are not registered at this bug tracker. Your experience will be greatly enhanced if you log in. To do so, you first must register by clicking on the Register tab at the top. If you are already registered, you can login at the Login tab.
Syndicate Syndicate Listing Display Search Login/Register
Bug Id ?
234
Reporter ?
OsamaBinLogin
MacGDBp / 1.4.1
Status ?
Closed
Severity ?
Moderate
Duplicate Of ?
- none -
Fixed in Revision ?
Mstone ?
Summary ?
Traceback fumbles function name if variable
Report Time ?
March 30, 2012 02:11 AM
Assignment ?
Resolution ?
Won't Fix
Priority ?
Normal
Dependencies ?
- none -
Mstone (old) ?


Votes
For: 0 (0%)
Against: 0 (0%)
Total: 0

March 30, 2012 02:11 AM OsamaBinLogin
the traceback in the upper right, sometimes it gets the function name wrong. Seems to be when you do some magic php where the name of the function comes from some variable or table, or something like that. It erroneously uses the parent function's filename, but ironically gets the line number correct. So the code it shows in the source pane points to a completely different file, in the middle of unrelated code, in one case a big comment block. It's OK if you can't get it in such situations, but PLEASE don't be misleading - just leave the filename blank or something for that level, and punt on the stuff you can't do accurately. Or use the parent function AND the parent line number. It wastes time when you chase down these ghosts.

September 3, 2012 12:57 AM Robert
Can you provide a reduced reproduction case for this? Attach a PHP file that demonstrates it here. Thanks.

September 11, 2012 04:04 PM OsamaBinLogin
hmmm... well I don't work at that place anymore, and I can't reproduce the environment.

It was while debugging code in Drupal 6. One thing that it does a lot is to call a function whose name was a character string, rather than the usual. For instance, in a drupal module, you can set a handler for 'hook_pre_adjust_index' by making a function named 'mymodulename_pre_adjust_index'. You don't have to register the callback or anything.

I suspected this was where it was fumbling; in a traceback of maybe twenty levels, there would be three or four levels where the function name was calculated rather than fixed. These places, the function name showed was a duplicate of the function name above, rather than the calculated function name that was actually called.

that's all i remember. Good luck on this, I really like the debugger and it's sorely needed for php! thanks!

December 7, 2015 07:05 AM Robert
Going to close this, but I suspect this is an issue with Xdebug. MacGDBp gets the function names from the backend debugger, and so it must have provided the wrong name.

On December 7, 2015 07:05 AM, Robert changed: