Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/agent
diff options
context:
space:
mode:
authorEugene Tarassov2019-02-13 22:20:24 +0000
committerEugene Tarassov2019-02-13 22:21:53 +0000
commit13fc9ee526e7a32935b58a6ae286239013e194db (patch)
treec97f73872e04a012d4ffae462228e51b032cae3f /agent
parentfed8d89c69839ca2e0b3a16f5e3548520bd38a8e (diff)
downloadorg.eclipse.tcf.agent-13fc9ee526e7a32935b58a6ae286239013e194db.tar.gz
org.eclipse.tcf.agent-13fc9ee526e7a32935b58a6ae286239013e194db.tar.xz
org.eclipse.tcf.agent-13fc9ee526e7a32935b58a6ae286239013e194db.zip
Bug 544359: After applying Bug 543995, line breakpoints are adjusted to wrong line on e500v2
Diffstat (limited to 'agent')
-rw-r--r--agent/tcf/services/dwarfcache.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/agent/tcf/services/dwarfcache.c b/agent/tcf/services/dwarfcache.c
index 307ba3c3..d81cd2f2 100644
--- a/agent/tcf/services/dwarfcache.c
+++ b/agent/tcf/services/dwarfcache.c
@@ -2102,6 +2102,20 @@ static void add_state(CompUnit * unit, LineNumbersState * state) {
s.mAddress = state->mAddress;
add_state(unit, &s);
}
+ if (unit->mStatesCnt > 0) {
+ /* Workaround: malformed gnu-8.1.0.0 line info when -gstatement-frontiers is used.
+ * See https://bugs.eclipse.org/bugs/show_bug.cgi?id=544359
+ */
+ LineNumbersState * last = unit->mStates + unit->mStatesCnt - 1;
+ if (last->mAddress == state->mAddress && last->mSection == state->mSection &&
+ last->mFile == state->mFile && last->mLine == state->mLine && last->mColumn == state->mColumn &&
+ (last->mFlags & ~(LINE_IsStmt | LINE_BasicBlock)) == state->mFlags) {
+ last->mISA = state->mISA;
+ last->mOpIndex = state->mOpIndex;
+ last->mDiscriminator = state->mDiscriminator;
+ return;
+ }
+ }
if (unit->mStatesCnt >= unit->mStatesMax) {
unit->mStatesMax = unit->mStatesMax == 0 ? 128 : unit->mStatesMax * 2;
unit->mStates = (LineNumbersState *)loc_realloc(unit->mStates, sizeof(LineNumbersState) * unit->mStatesMax);

Back to the top