// Require a gdb that can read DW_TAG_variant_part.// min-gdb-version: 8.2// compile-flags:-g -Z thinlto// === GDB TESTS ===================================================================================// gdb-command:run// gdb-command:print *abc// gdbr-check:1ドル = enum_thinlto::ABC::TheA{x: 0, y: 8970181431921507452}// === LLDB TESTS ==================================================================================// lldb-command:run// lldb-command:print *abc// lldbg-check:(enum_thinlto::ABC) 0ドル =// lldbr-check:(enum_thinlto::ABC) *abc = (x = 0, y = 8970181431921507452)#![allow(unused_variables)]#![feature(omit_gdb_pretty_printer_section)]#![omit_gdb_pretty_printer_section]// The first element is to ensure proper alignment, irrespective of the machines word size. Since// the size of the discriminant value is machine dependent, this has be taken into account when// datatype layout should be predictable as in this case.#[derive(Debug)]enum ABC {TheA { x: i64, y: i64 },TheB (i64, i32, i32),}fn main() {let abc = ABC::TheA { x: 0, y: 0x7c7c_7c7c_7c7c_7c7c };f(&abc);}fn f(abc: &ABC) {zzz(); // #breakprintln!("{:?}", abc);}fn zzz() {()}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。