Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] How to put error marker for breakpoint at invalid address in disassembly view
  • From: Shiva Sharma <SHIVA.SHARMA@xxxxxxxxxxxx>
  • Date: Thu, 6 May 2021 11:07:55 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; 1; spf=pass; dmarc=pass action=none; dkim=pass; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed;; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=01gu8ey2JgAK3mDH+O3LFyyStko6C3Rl1e1wPMQ0L4o=; b=jsHiezA5PibK3dIZuTrTnErsi6QF8mJTo6hfb5kQpu2r3FMrHlSXfJ6+Bp3wJ0WIShyo5m403562ctWGbKaYqYcyAjaPSTy8G/8RyX9149TkRQTDcJthhNKFQk1TrAarOrwQKzCv5BBZ57ETy2fNkYlA+xVjW2WFB1moIj54dJuaF4bNwyuY3XwELt3pmZPf5dxpXnjsLttktiupykpqQJ1upvfKViyuv7X1TzG6U24wM9S/x+LWCxkm2q2/bHPf87UmYDovadC3DOrXMyJlwWRNnflWt9UyTcQhxvw5M0YHH+nCZXmFRaTdc5vP1+BA1eAmEQ6wi5IycMJmG/nbKg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901;; cv=none; b=mhpt+Iu+UUsTQvyE7vySV6TeMbWOC3h6cyxLX6udL5U+DSuGfssLbEm1oE7BvkTq/w68se9uadCiTC6UP/SmzKhAsY2PLP7i8uNhZsUgr1pRVyXErZR9DR9Evgt3W9vBZE9ayRTOH10tX/w2qptu+vspeKEJrnPGhisPYCC4M9s8PEe627yedDWbfH4XfUx8o1Z9DDD2dT95CO+s8c1RJv/0b54FzUwJ459C1KbY4WKG7Y5Kerd6pa25pbapDvTFyKm98zBTcuuZNET5gr3ddvjaZCwMoOSiItzo1lSyqlEotj/03yqjv64UOKmawlb+r7VBEQnw6TU0xnqkymK5jQ==
  • Delivered-to: cdt-dev@xxxxxxxxxxx
  • List-archive: <>
  • List-help: <>
  • List-subscribe: <>, <>
  • List-unsubscribe: <>, <>
  • Thread-index: AddCUq0GMQ+ojMA3THe0lz9JnT9sNwAFVU+Q
  • Thread-topic: How to put error marker for breakpoint at invalid address in disassembly view

Hello Team,
The situation is that I have a list of address where there is either a delay slot or something else due to which hardware breakpoint cannot be put at these locations. If an error(…) is returned by GDB to Eclipse, then the error marker is correctly created by CDT (10.2) in C/C++ Source Editor but when breakpoint is put in disassembly view then there is no error marker created.
Issue is probably a bug in CDT code. The issue is that the address breakpoint user puts in disassembly window is instance of CAddressBreakpoint which in turn is instance of ICLineBreakpoint and therefore the following ‘if’ condition becomes true for address breakpoint as well:
if (breakpoint instanceof ICLineBreakpoint)) {...}
But the code inside the if condition will not create a correct error marker in disassembly window because it uses line number for position. I tried using address from the breakpoint object for position attribute but that did not help either.

Code I tried just above the above mentioned if condition is as following:
        if (breakpoint instanceof ICAddressBreakpoint) {
                IMarker marker = fBreakpointMarkerProblems.remove(breakpoint);
                if (marker != null) {
                        try {
                        } catch (CoreException e) { }
                CAddressBreakpoint addressBreakpoint = (CAddressBreakpoint) breakpoint;
                try {
                        IMarker breakpointMarker = addressBreakpoint.getMarker();
                        breakpointMarker.setAttribute(IMarker.MESSAGE,     description);
                        breakpointMarker.setAttribute(IMarker.SEVERITY,    severity);
                 } catch (CoreException e) { }
        } else if (breakpoint instanceof ICLineBreakpoint)) {...}
This works but it does not add a new error marker BUT edits the message in the breakpoint marker itself. Please guide on inserting a new error marker for an address in disassembly view!
Thanks & Best Regards,
Shiva Sharma..

Back to the top