Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6295f210 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Make pbtombstone a host tool." into main am: 539f39e6 am: 3666cc28

parents b6ed2dc5 3666cc28
Loading
Loading
Loading
Loading
+8 −8
Original line number Diff line number Diff line
@@ -200,22 +200,18 @@ cc_library {
    ramdisk_available: true,
    recovery_available: true,
    vendor_ramdisk_available: true,
    host_supported: true,

    local_include_dirs: ["libdebuggerd/include"],
    export_include_dirs: ["libdebuggerd/include"],

    srcs: [
        "libdebuggerd/tombstone_proto_to_text.cpp",
    ],

    header_libs: [
        "bionic_libc_platform_headers",
        "libdebuggerd/utility_host.cpp",
    ],

    static_libs: [
        "libbase",
        "liblog_for_runtime_apex",
        "libunwindstack",
    ],

    whole_static_libs: [
@@ -223,6 +219,10 @@ cc_library {
        "libprotobuf-cpp-lite",
    ],

    shared_libs: [
        "liblog",
    ],

    apex_available: [
        "//apex_available:platform",
        "com.android.runtime",
@@ -331,15 +331,15 @@ cc_library_static {

cc_binary {
    name: "pbtombstone",
    host_supported: true,
    defaults: ["debuggerd_defaults"],
    srcs: ["pbtombstone.cpp"],
    static_libs: [
        "libbase",
        "libdebuggerd",
        "libdebuggerd_tombstone_proto_to_text",
        "liblog",
        "libprotobuf-cpp-lite",
        "libtombstone_proto",
        "libunwindstack",
    ],
}

+1 −2
Original line number Diff line number Diff line
@@ -70,6 +70,7 @@
#include "crash_test.h"
#include "debuggerd/handler.h"
#include "gtest/gtest.h"
#include "libdebuggerd/utility_host.h"
#include "protocol.h"
#include "tombstoned/tombstoned.h"
#include "util.h"
@@ -741,8 +742,6 @@ TEST_F(CrasherTest, mte_multiple_causes) {
}

#if defined(__aarch64__)
constexpr size_t kTagGranuleSize = 16;

static uintptr_t CreateTagMapping() {
  // Some of the MTE tag dump tests assert that there is an inaccessible page to the left and right
  // of the PROT_MTE page, so map three pages and set the two guard pages to PROT_NONE.
+0 −4
Original line number Diff line number Diff line
@@ -67,10 +67,6 @@ void engrave_tombstone_proto(Tombstone* tombstone, unwindstack::AndroidUnwinder*
                             const Architecture* guest_arch,
                             unwindstack::AndroidUnwinder* guest_unwinder);

bool tombstone_proto_to_text(
    const Tombstone& tombstone,
    std::function<void(const std::string& line, bool should_log)> callback);

void fill_in_backtrace_frame(BacktraceFrame* f, const unwindstack::FrameData& frame);
void set_human_readable_cause(Cause* cause, uint64_t fault_addr);
#if defined(__aarch64__)
+26 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2024 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#pragma once

#include <functional>
#include <string>

class Tombstone;

bool tombstone_proto_to_text(
    const Tombstone& tombstone,
    std::function<void(const std::string& line, bool should_log)> callback);
+0 −7
Original line number Diff line number Diff line
@@ -91,10 +91,3 @@ bool signal_has_si_addr(const siginfo_t*);
void get_signal_sender(char* buf, size_t n, const siginfo_t*);
const char* get_signame(const siginfo_t*);
const char* get_sigcode(const siginfo_t*);

// Number of bytes per MTE granule.
constexpr size_t kTagGranuleSize = 16;

// Number of rows and columns to display in an MTE tag dump.
constexpr size_t kNumTagColumns = 16;
constexpr size_t kNumTagRows = 16;
Loading