Example #1
0
def _get_gdb_command_to_inject_bare_metal_gdb_py(main_binary):
  return (
      gdb_util.get_gdb_python_init_args() +
      gdb_util.get_gdb_python_script_init_args(
          'bare_metal_support_for_unittest',
          nonsfi_loader=toolchain.get_nonsfi_loader(),
          test_binary=main_binary,
          library_path=build_common.get_load_library_path(),
          runnable_ld_path=build_common.get_bionic_runnable_ld_so()))
Example #2
0
def _launch_nacl_gdb(gdb_type, nacl_irt_path, port):
  nmf = os.path.join(build_common.get_runtime_out_dir(),
                     'arc_' + OPTIONS.target() + '.nmf')
  assert os.path.exists(nmf), (
      nmf + ' not found, you will have a bad time debugging')

  # TODO(nativeclient:3739): We explicitly specify the path of
  # runnable-ld.so to work-around the issue in nacl-gdb, but we should
  # let nacl-gdb find the path from NMF.
  gdb_args = ['-ex', 'nacl-manifest %s' % nmf]
  if nacl_irt_path:
    gdb_args.extend(['-ex', 'nacl-irt %s' % nacl_irt_path])
  gdb_args.extend(['-ex', 'target remote %s:%s' % (_LOCAL_HOST, port),
                   build_common.get_bionic_runnable_ld_so()])
  _launch_plugin_gdb(gdb_args, gdb_type)
Example #3
0
def _launch_nacl_gdb(gdb_type, nacl_irt_path, port):
    nmf = os.path.join(build_common.get_runtime_out_dir(),
                       'arc_' + OPTIONS.target() + '.nmf')
    assert os.path.exists(nmf), (
        nmf + ' not found, you will have a bad time debugging')

    # TODO(nativeclient:3739): We explicitly specify the path of
    # runnable-ld.so to work-around the issue in nacl-gdb, but we should
    # let nacl-gdb find the path from NMF.
    gdb_args = ['-ex', 'nacl-manifest %s' % nmf]
    if nacl_irt_path:
        gdb_args.extend(['-ex', 'nacl-irt %s' % nacl_irt_path])
    gdb_args.extend([
        '-ex',
        'target remote %s:%s' % (_LOCAL_HOST, port),
        build_common.get_bionic_runnable_ld_so()
    ])
    _launch_plugin_gdb(gdb_args, gdb_type)