MantisBT

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000596XdebugFeature/Change requestpublic2010-07-15 15:562010-07-24 00:26
Reportersklar 
Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version2.1.0 
Target VersionFixed in Version 
Summary0000596: Call breakpoint never works with instance methods, only static methods
DescriptionIf you set a call breakpoint with an instance method, the breakpoint will never get triggered.
Additional Information
In xdebug_handler_dbgp.c, DBGP_FUNC(breakpoint_set) always stores the function name in the function_breakpoints hash as "class::method" (line 1133 in the 2.1.0 codebase). Which sort of makes sense here, since it's just been given -a class -m method from the client, it doesn't know whether it's a static method or an instance method.

In xdebug.c handle_breakpoints(), though, the code checks whether the function is an instance or static function and then builds the name appropriately (class->method or class::method). So if it's an instance method, the name is built as "class->method" which is never found in the function_breakpoints hash.

If I change handle_breakpoints() to always build the name as "class::method" then the breakpoint is triggered.
TagsNo tags attached.
Operating System
PHP Version5.3.1
Attached Files

- Relationships

-  Notes
(0001534)
derick (administrator)
2010-07-20 20:20

Hmm, I thought I had fixed this already, but apparently I hadn't. Will get to this soon.
(0001541)
derick (administrator)
2010-07-24 00:26

Fixed in rev. 3329.

- Issue History
Date Modified Username Field Change
2010-07-15 15:56 sklar New Issue
2010-07-15 15:56 sklar PHP Version => 5.3.1
2010-07-15 15:56 sklar Xdebug Version => 2.1.0
2010-07-20 20:20 derick Note Added: 0001534
2010-07-24 00:26 derick Note Added: 0001541
2010-07-24 00:26 derick Status new => closed
2010-07-24 00:26 derick Resolution open => fixed


Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker