mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-30 10:07:14 +02:00
Use OS-native directory separator in sizedata report
This commit is contained in:
@ -12,6 +12,8 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
|
# pylint: disable=too-many-locals
|
||||||
|
|
||||||
from __future__ import absolute_import
|
from __future__ import absolute_import
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
@ -23,12 +25,14 @@ from elftools.elf.elffile import ELFFile
|
|||||||
|
|
||||||
from platformio.compat import dump_json_to_unicode
|
from platformio.compat import dump_json_to_unicode
|
||||||
from platformio.proc import exec_command
|
from platformio.proc import exec_command
|
||||||
|
from platformio.util import get_systype
|
||||||
|
|
||||||
|
|
||||||
def _get_file_location(env, elf_path, addr, sysenv):
|
def _get_file_location(env, elf_path, addr, sysenv):
|
||||||
cmd = [env.subst("$CC").replace("-gcc", "-addr2line"), "-e", elf_path, hex(addr)]
|
cmd = [env.subst("$CC").replace("-gcc", "-addr2line"), "-e", elf_path, hex(addr)]
|
||||||
result = exec_command(cmd, env=sysenv)
|
result = exec_command(cmd, env=sysenv)
|
||||||
return result["out"].strip().replace("\\", "/")
|
path = result["out"].strip()
|
||||||
|
return path.replace("/", "\\") if "windows" in get_systype() else path
|
||||||
|
|
||||||
|
|
||||||
def _determine_section(sections, symbol_addr):
|
def _determine_section(sections, symbol_addr):
|
||||||
|
Reference in New Issue
Block a user