generate_memory_usage_report/gcc_map_reader BUG? fix #721
This commit is contained in:
parent
f1bb43abb5
commit
d973ebaa1c
Binary file not shown.
Binary file not shown.
|
@ -54,7 +54,7 @@ public class GccMapReader {
|
|||
String line = lines.get(i);
|
||||
if (!line.contains(".bss."))
|
||||
continue;
|
||||
debug(line);
|
||||
debug("Got: " + line);
|
||||
|
||||
Matcher m1 = SINGLE_LINE_PATTERN.matcher(line);
|
||||
|
||||
|
@ -75,8 +75,8 @@ public class GccMapReader {
|
|||
Matcher m2 = MULTI_LINE_PATTERN.matcher(line);
|
||||
|
||||
if (!m2.matches()) {
|
||||
debug("Skipping " + line);
|
||||
return lineIndex;
|
||||
debug("Returning into consideration: " + line);
|
||||
return lineIndex - 1;
|
||||
}
|
||||
|
||||
String sizeString = m2.group(1);
|
||||
|
|
|
@ -53,7 +53,8 @@ public class GccMapReaderTest {
|
|||
" .bss.ch 0x1fff9320 0x80 build_kinetis/obj/chschd.o",
|
||||
" 0x1fff9320 ch"));
|
||||
assertNotNull(r);
|
||||
assertEquals(1, r.size());
|
||||
assertEquals(0x80, r.get(0).getSize());
|
||||
assertEquals(2, r.size());
|
||||
assertEquals(0x610, r.get(0).getSize());
|
||||
assertEquals(0x80, r.get(1).getSize());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue