(command.CommandList children: [ (command.ShFunction name: echo_then_sudo body: (BraceGroup children: [ (command.Simple words: [{<echo>} {(DQ <'About to execute privileged command: '> ($ Id.VSub_At '$@'))}] redirects: [(redir op:<Id.Redir_GreatAnd '1>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})] do_fork: T ) (C {<sudo>} {<-k>} {(DQ ($ Id.VSub_At '$@'))}) ] ) ) (command.ShFunction name: fixup_debuglink body: (BraceGroup children: [ (command.Simple words: [{<echo>} {(DQ <'begin fixup_debuglink'>)}] redirects: [(redir op:<Id.Redir_GreatAnd '1>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})] do_fork: T ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:obj) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_Number '$1'))} spids: [58] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:debuglink) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_Number '$2'))} spids: [64] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:current_debuglink) op: assign_op.Equal rhs: { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<read_debuglink>} {(DQ ($ Id.VSub_DollarName '$obj'))}) ) ) } spids: [70] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:has_debuglink) op: assign_op.Equal rhs: {($ Id.VSub_QMark '$?')} spids: [84] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.AndOr ops: [Id.Op_DAmp] children: [ (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_eq left: {($ Id.VSub_DollarName '$has_debuglink')} right: {<0>} ) ) (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: {(DQ ($ Id.VSub_DollarName '$current_debuglink'))} right: {(DQ ($ Id.VSub_DollarName '$debuglink'))} ) ) ] ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.Simple words: [ {<echo>} { (DQ <'detected that debuglink '> ($ Id.VSub_DollarName '$debuglink_value') <' is already valid'> ) } ] redirects: [ (redir op: <Id.Redir_GreatAnd '1>&'> loc: (redir_loc.Fd fd:1) arg: {<2>} ) ] do_fork: T ) (command.ControlFlow token: <Id.ControlFlow_Return return> arg_word: {<0>} ) ] spids: [90 119] ) ] else_action: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_eq left: {($ Id.VSub_DollarName '$has_debuglink')} right: {<0>} ) ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.Simple words: [ {<echo>} { (DQ <'detected that debuglink '> ($ Id.VSub_DollarName '$current_debuglink') <' needs fixing up to '> ($ Id.VSub_DollarName '$debuglink') ) } ] redirects: [ (redir op: <Id.Redir_GreatAnd '1>&'> loc: (redir_loc.Fd fd:1) arg: {<2>} ) ] do_fork: T ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:tmpfile) op: assign_op.Equal rhs: { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<mktemp>}) ) ) } spids: [176] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:saved_ug) op: assign_op.Equal rhs: { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<stat>} {<-c>} {(DQ <'%u:%g'>)} { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<readlink>} {<-f>} {(DQ ($ Id.VSub_DollarName '$obj'))} ) ) ) } ) ) ) } spids: [184] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:saved_mode) op: assign_op.Equal rhs: { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<stat>} {<-c>} {(DQ <'%a'>)} { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<readlink>} {<-f>} {(DQ ($ Id.VSub_DollarName '$obj'))} ) ) ) } ) ) ) } spids: [214] ) ] ) (command.Sentence child: (command.AndOr ops: [Id.Op_DPipe] children: [ (command.Subshell child: (command.AndOr ops: [Id.Op_DAmp Id.Op_DAmp Id.Op_DAmp] children: [ (C {<echo_then_sudo>} {<objcopy>} {<--remove-section>} {<.gnu_debuglink>} {(DQ ($ Id.VSub_DollarName '$obj'))} {(DQ ($ Id.VSub_DollarName '$tmpfile'))} ) (C {<echo_then_sudo>} {<chown>} {(DQ ($ Id.VSub_DollarName '$saved_ug'))} {(DQ ($ Id.VSub_DollarName '$tmpfile'))} ) (C {<echo_then_sudo>} {<chmod>} {(DQ ($ Id.VSub_DollarName '$saved_mode'))} {(DQ ($ Id.VSub_DollarName '$tmpfile'))} ) (C {<echo_then_sudo>} {<mv>} {(DQ ($ Id.VSub_DollarName '$tmpfile'))} {(DQ ($ Id.VSub_DollarName '$obj'))} ) ] ) ) (command.Simple words: [{<echo>} {(DQ <'objcopy failed'>)}] redirects: [ (redir op: <Id.Redir_GreatAnd '1>&'> loc: (redir_loc.Fd fd:1) arg: {<2>} ) ] do_fork: T ) ] ) terminator: <Id.Op_Semi _> ) (command.ControlFlow token: <Id.ControlFlow_Return return> arg_word: {<1>} ) ] spids: [142 155] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:tmpfile) op: assign_op.Equal rhs: {(DQ (command_sub left_token:<Id.Left_DollarParen '$('> child:(C {<mktemp>})))} spids: [341] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:saved_ug) op: assign_op.Equal rhs: { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<stat>} {<-c>} {(DQ <'%u:%g'>)} { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<readlink>} {<-f>} {(DQ ($ Id.VSub_DollarName '$obj'))}) ) ) } ) ) ) } spids: [349] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:saved_mode) op: assign_op.Equal rhs: { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<stat>} {<-c>} {(DQ <'%a'>)} { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<readlink>} {<-f>} {(DQ ($ Id.VSub_DollarName '$obj'))}) ) ) } ) ) ) } spids: [379] ) ] ) (command.AndOr ops: [Id.Op_DAmp Id.Op_DAmp Id.Op_DAmp Id.Op_DAmp Id.Op_DAmp Id.Op_DPipe] children: [ (C {<echo_then_sudo>} {<objcopy>} {<--add-gnu-debuglink> <Id.Lit_Equals '='> (DQ ($ Id.VSub_DollarName '$debuglink')) } {(DQ ($ Id.VSub_DollarName '$obj'))} {(DQ ($ Id.VSub_DollarName '$tmpfile'))} ) (C {<echo_then_sudo>} {<chown>} {(DQ ($ Id.VSub_DollarName '$saved_ug'))} {(DQ ($ Id.VSub_DollarName '$tmpfile'))} ) (C {<echo_then_sudo>} {<chmod>} {(DQ ($ Id.VSub_DollarName '$saved_mode'))} {(DQ ($ Id.VSub_DollarName '$tmpfile'))} ) (C {<echo_then_sudo>} {<mv>} {(DQ ($ Id.VSub_DollarName '$tmpfile'))} {(DQ ($ Id.VSub_DollarName '$obj'))} ) (command.Simple words: [{<echo>} {(DQ <success>)}] redirects: [ (redir op: <Id.Redir_GreatAnd '1>&'> loc: (redir_loc.Fd fd:1) arg: {<2>} ) ] do_fork: T ) (command.ControlFlow token: <Id.ControlFlow_Return return> arg_word: {<0>} ) (command.Subshell child: (command.CommandList children: [ (command.Sentence child: (command.Simple words: [{<echo>} {(DQ <'objcopy failed'>)}] redirects: [ (redir op: <Id.Redir_GreatAnd '1>&'> loc: (redir_loc.Fd fd:1) arg: {<2>} ) ] do_fork: T ) terminator: <Id.Op_Semi _> ) (command.ControlFlow token: <Id.ControlFlow_Return return> arg_word: {<1>} ) ] ) ) ] ) ] ) ] ) ) (command.ShFunction name: contains_debug_symbols body: (BraceGroup children: [ (command.Pipeline children: [ (C {<objdump>} {<-h>} {(DQ ($ Id.VSub_Number '$1'))}) (command.Simple words: [{<grep>} {(SQ <'\\.debug_info'>)}] redirects: [ (redir op: <Id.Redir_Great '1>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) (redir op: <Id.Redir_Great '2>'> loc: (redir_loc.Fd fd:2) arg: {<'/dev/null'>} ) ] do_fork: T ) ] negated: F ) ] ) ) (command.ShFunction name: read_debuglink body: (BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:debuglink_info) op: assign_op.Equal rhs: { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (command.Pipeline children: [ (C {<objdump>} {<-h>} {(DQ ($ Id.VSub_Number '$1'))}) (C {<grep>} {(SQ <'\\.gnu_debuglink'>)}) ] negated: F ) ) ) } spids: [561] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Unary op_id: Id.BoolUnary_z child: {(DQ ($ Id.VSub_DollarName '$debuglink_info'))} ) ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.Simple words: [{<echo>} {(DQ <'no debuglink in '> ($ Id.VSub_Number '$1'))}] redirects: [ (redir op: <Id.Redir_GreatAnd '1>&'> loc: (redir_loc.Fd fd:1) arg: {<2>} ) ] do_fork: T ) (command.ControlFlow token: <Id.ControlFlow_Return return> arg_word: {<1>} ) ] spids: [585 598] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:debuglink_off) op: assign_op.Equal rhs: { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (command.Pipeline children: [ (C {<echo>} {(DQ ($ Id.VSub_DollarName '$debuglink_info'))}) (C {<sed>} {(SQ <'s/^[[:blank:]]*//'>)}) (C {<tr>} {<-s>} {(SQ <'[:blank:]'>)} {(SQ <'\\t'>)}) (C {<cut>} {<-f6>}) ] negated: F ) ) ) } spids: [620] ) ] ) (command.Simple words: [{<echo>} {(DQ <'read debuglink_off: '> ($ Id.VSub_DollarName '$debuglink_off'))}] redirects: [(redir op:<Id.Redir_GreatAnd '1>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})] do_fork: T ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Unary op_id: Id.BoolUnary_n child: {(DQ ($ Id.VSub_DollarName '$debuglink_off'))} ) ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:debuglink_off_bytes) op: assign_op.Equal rhs: { (word_part.ArithSub anode: (arith_expr.Binary op_id: Id.Arith_Plus left: {<Id.Lit_Digits 0> <Id.Lit_ArithVarLike x> ($ Id.VSub_DollarName '$debuglink_off') } right: {<Id.Lit_Digits 0>} ) ) } spids: [689] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Unary op_id: Id.BoolUnary_z child: {(DQ ($ Id.VSub_DollarName '$debuglink_off_bytes'))} ) ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.Simple words: [{<echo>} {(DQ <'bad debuglink header'>)}] redirects: [ (redir op: <Id.Redir_GreatAnd '1>&'> loc: (redir_loc.Fd fd:1) arg: {<2>} ) ] do_fork: T ) (command.ControlFlow token: <Id.ControlFlow_Return return> arg_word: {<1>} ) ] spids: [704 717] ) ] else_action: [ (command.Pipeline children: [ (C {<od>} {<--skip-bytes> <Id.Lit_Equals '='> (${ Id.VSub_Name debuglink_off_bytes) } {<--string>} {(DQ ($ Id.VSub_Number '$1'))} ) (C {<head>} {<-n1>}) (C {<sed>} {(SQ <'s/^[0-9a-f]* //'>)}) ] negated: F ) (command.ControlFlow token: <Id.ControlFlow_Return return> arg_word: {<0>} ) ] ) ] spids: [673 686] ) ] ) (command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<1>}) ] ) ) (command.ShFunction name: find_debug_file_for body: (BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:file) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_Number '$1'))} spids: [794] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.Pipeline children: [ (C {<readelf>} {<-wi>} {(DQ ($ Id.VSub_DollarName '$file'))}) (command.Simple words: [{<grep>} {<-m1>} {<.>}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) ] do_fork: T ) ] negated: T ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:debuglink_val) op: assign_op.Equal rhs: { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<read_debuglink>} {(DQ ($ Id.VSub_DollarName '$file'))}) ) ) } spids: [831] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Unary op_id: Id.BoolUnary_n child: {(DQ ($ Id.VSub_DollarName '$debuglink_val'))} ) ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.Simple words: [ {<echo>} { (DQ <'Read debuglink val: '> ($ Id.VSub_DollarName '$debuglink_val')) } ] redirects: [ (redir op: <Id.Redir_GreatAnd '1>&'> loc: (redir_loc.Fd fd:1) arg: {<2>} ) ] do_fork: T ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:resolved_debuglink) op: assign_op.Equal rhs: { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<resolve_debuglink>} {(DQ ($ Id.VSub_DollarName '$file'))} {(DQ ($ Id.VSub_DollarName '$debuglink_val'))} ) ) ) } spids: [872] ) ] ) (command.Simple words: [ {<echo>} { (DQ <'Resolved debuglink to: '> ($ Id.VSub_DollarName '$resolved_debuglink') ) } ] redirects: [ (redir op: <Id.Redir_GreatAnd '1>&'> loc: (redir_loc.Fd fd:1) arg: {<2>} ) ] do_fork: T ) (C {<echo>} {(DQ ($ Id.VSub_DollarName '$resolved_debuglink'))}) ] spids: [845 858] ) ] else_action: [ (command.Simple words: [{<echo>} {(DQ <'No debuglink found'>)}] redirects: [ (redir op: <Id.Redir_GreatAnd '1>&'> loc: (redir_loc.Fd fd:1) arg: {<2>} ) ] do_fork: T ) (C {<echo>} {(DQ ($ Id.VSub_DollarName '$file'))}) ] ) ] spids: [804 828] ) ] else_action: [(C {<echo>} {(DQ ($ Id.VSub_DollarName '$file'))})] ) ] ) ) (command.ShFunction name: readelf_debug body: (BraceGroup children: [ (C {<declare>} {<-a>} {<args>}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:ctr) op: assign_op.Equal rhs: {<1>} spids: [961] ) ] ) (command.WhileUntil keyword: <Id.KW_While while> cond: (condition.Shell commands: [(command.Sentence child:(C {<true>}) terminator:<Id.Op_Semi _>)] ) body: (command.DoGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.IndexedName name: args index: {($ Id.VSub_DollarName '$ctr')} ) op: assign_op.Equal rhs: {($ Id.VSub_Number '$1')} spids: [973] ) ] ) (command.Sentence child: (command.AndOr ops: [Id.Op_DPipe] children: [ (C {<shift>}) (command.ControlFlow token: <Id.ControlFlow_Break break> ) ] ) terminator: <Id.Op_Semi _> ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:ctr) op: assign_op.Equal rhs: { (word_part.ArithSub anode: (arith_expr.Binary op_id: Id.Arith_Plus left: {($ Id.VSub_DollarName '$ctr')} right: {<Id.Lit_Digits 1>} ) ) } spids: [989] ) ] ) ] ) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:file) op: assign_op.Equal rhs: { (braced_var_sub token: <Id.VSub_Name args> bracket_op: (bracket_op.ArrayIndex expr: { (word_part.ArithSub anode: (arith_expr.Binary op_id: Id.Arith_Minus left: {($ Id.VSub_DollarName '$ctr')} right: {<Id.Lit_Digits 1>} ) ) } ) ) } spids: [1005] ) ] ) (command.Simple words: [ {<echo>} { (DQ <'Slurped args: '> (braced_var_sub token: <Id.VSub_Name args> bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At) ) ) } ] redirects: [(redir op:<Id.Redir_GreatAnd '1>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})] do_fork: T ) (command.Simple words: [{<echo>} {(DQ <'Guessed file arg: '> ($ Id.VSub_DollarName '$file'))}] redirects: [(redir op:<Id.Redir_GreatAnd '1>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})] do_fork: T ) (C {<unset>} {<Id.Lit_ArrayLhsOpen 'args['> (word_part.ArithSub anode: (arith_expr.Binary op_id: Id.Arith_Minus left: {($ Id.VSub_DollarName '$ctr')} right: {<Id.Lit_Digits 1>} ) ) <Id.Lit_RBracket ']'> } ) (C {<readelf>} { (braced_var_sub token: <Id.VSub_Name args> bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At) ) } { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<find_debug_file_for>} {(DQ ($ Id.VSub_DollarName '$file'))}) ) ) } ) ] ) ) (command.ShFunction name: get_cu_info body: (BraceGroup children: [ (command.Pipeline children: [ (C {<readelf_debug>} {<-wi>} {(DQ ($ Id.VSub_Number '$1'))}) (C {<grep>} {<-A7>} {(SQ <DW_TAG_compile_unit>)}) (C {<tr>} {(SQ <'\\n'>)} {(SQ <'\\f'>)}) (C {<sed>} {(SQ <'s/\\f--\\f/\\n/g'>)}) ] negated: F ) ] ) ) (command.ShFunction name: read_cu_info body: (BraceGroup children: [ (C {<read>} {<cu_info>}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:ret) op: assign_op.Equal rhs: {($ Id.VSub_QMark '$?')} spids: [1152] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Unary op_id: Id.BoolUnary_n child: {(DQ ($ Id.VSub_DollarName '$cu_info'))} ) ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:cu_fname) op: assign_op.Equal rhs: { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (command.Pipeline children: [ (C {<echo>} {(DQ ($ Id.VSub_DollarName '$cu_info'))}) (C {<tr>} {(SQ <'\\f'>)} {(SQ <'\\n'>)}) (C {<grep>} {<DW_AT_name>}) (C {<head>} {<-n1>}) (C {<sed>} { (SQ < 's/.*DW_AT_name[[:blank:]]*:[[:blank:]]*\\((.*, offset: 0x[0-9a-f]*): \\)\\?\\(.*\\)/\\2/' > ) } ) (C {<sed>} {(SQ <'s/[[:blank:]]*$//'>)}) ] negated: F ) ) ) } spids: [1172] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:cu_language_fullstr) op: assign_op.Equal rhs: { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (command.Pipeline children: [ (C {<echo>} {(DQ ($ Id.VSub_DollarName '$cu_info'))}) (C {<tr>} {(SQ <'\\f'>)} {(SQ <'\\n'>)}) (C {<grep>} {<DW_AT_language>}) (C {<head>} {<-n1>}) (C {<sed>} {(SQ <'s/.*DW_AT_language[[:blank:]]*:[[:blank:]]*//'>)} ) (C {<sed>} {(SQ <'s/[[:blank:]]*$//'>)}) ] negated: F ) ) ) } spids: [1225] ) ] ) (command.Simple words: [{<echo>} {(DQ <'Note: found CU '> ($ Id.VSub_DollarName '$cu_fname'))}] redirects: [ (redir op: <Id.Redir_GreatAnd '1>&'> loc: (redir_loc.Fd fd:1) arg: {<2>} ) ] do_fork: T ) (command.Simple words: [{<echo>} {(DQ <'CU info is: '> ($ Id.VSub_DollarName '$cu_info'))}] redirects: [ (redir op: <Id.Redir_GreatAnd '1>&'> loc: (redir_loc.Fd fd:1) arg: {<2>} ) ] do_fork: T ) (command.Simple words: [ {<echo>} { (DQ <'language field of CU info is '> (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<echo>} {(DQ ($ Id.VSub_DollarName '$cu_language_fullstr'))}) ) ) } ] redirects: [ (redir op: <Id.Redir_GreatAnd '1>&'> loc: (redir_loc.Fd fd:1) arg: {<2>} ) ] do_fork: T ) (command.Simple words: [ {<echo>} { (DQ <'comp_dir line of CU info is '> (command_sub left_token: <Id.Left_DollarParen '$('> child: (command.Pipeline children: [ (C {<echo>} {(DQ ($ Id.VSub_DollarName '$cu_info'))}) (C {<tr>} {(SQ <'\\f'>)} {(SQ <'\\n'>)}) (C {<grep>} {<DW_AT_comp_dir>}) ] negated: F ) ) ) } ] redirects: [ (redir op: <Id.Redir_GreatAnd '1>&'> loc: (redir_loc.Fd fd:1) arg: {<2>} ) ] do_fork: T ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:cu_compdir) op: assign_op.Equal rhs: { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (command.Pipeline children: [ (C {<echo>} {(DQ ($ Id.VSub_DollarName '$cu_info'))}) (C {<tr>} {(SQ <'\\f'>)} {(SQ <'\\n'>)}) (C {<grep>} {<DW_AT_comp_dir>}) (C {<sed>} { (SQ < 's/.*DW_AT_comp_dir[[:blank:]]*:[[:blank:]]*\\((.*, offset: 0x[0-9a-f]*): \\)\\?\\(.*\\)/\\2/' > ) } ) (C {<sed>} {(SQ <'s/[[:blank:]]*$//'>)}) ] negated: F ) ) ) } spids: [1356] ) ] ) (command.Simple words: [ {<echo>} {(DQ <'Note: found comp_dir '> ($ Id.VSub_DollarName '$cu_compdir'))} ] redirects: [ (redir op: <Id.Redir_GreatAnd '1>&'> loc: (redir_loc.Fd fd:1) arg: {<2>} ) ] do_fork: T ) (command.Case to_match: {(DQ ($ Id.VSub_DollarName '$cu_fname'))} arms: [ (case_arm pat_list: [{<'/'> <Id.Lit_Star '*'>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:cu_sourcepath) op: assign_op.Equal rhs: {(DQ (${ Id.VSub_Name cu_fname))} spids: [1434] ) ] ) ] spids: [1428 1431 1442 -1] ) (case_arm pat_list: [{<Id.Lit_Star '*'>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:cu_sourcepath) op: assign_op.Equal rhs: { (DQ (${ Id.VSub_Name cu_compdir) <'/'> (${ Id.VSub_Name cu_fname)) } spids: [1450] ) ] ) ] spids: [1445 1447 1462 -1] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:cu_language_num) op: assign_op.Equal rhs: { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (command.Pipeline children: [ (C {<echo>} {(DQ ($ Id.VSub_DollarName '$cu_language_fullstr'))}) (C {<tr>} {<-s>} {(SQ <'[[:blank:]]'>)} {(SQ <'\\t'>)}) (C {<cut>} {<-f1>}) ] negated: F ) ) ) } spids: [1468] ) ] ) ] spids: [1156 1169] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:cu_fname) op: assign_op.Equal rhs: {(DQ )} spids: [1505] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:cu_language_fullstr) op: assign_op.Equal rhs: {(DQ )} spids: [1510] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:cu_compdir) op: assign_op.Equal rhs: {(DQ )} spids: [1515] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:cu_sourcepath) op: assign_op.Equal rhs: {(DQ )} spids: [1520] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:cu_language_num) op: assign_op.Equal rhs: {(DQ )} spids: [1525] ) ] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_eq left: {($ Id.VSub_DollarName '$ret')} right: {<0>} ) ) terminator: <Id.Op_Semi _> ) ] ) action: [(command.Sentence child:(C {<true>}) terminator:<Id.Op_Semi _>)] spids: [1534 1547] ) ] else_action: [(command.Sentence child:(C {<false>}) terminator:<Id.Op_Semi _>)] ) ] ) ) (command.ShFunction name: resolve_debuglink body: (BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:obj) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_Number '$1'))} spids: [1570] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:debuglink_value) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_Number '$2'))} spids: [1576] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:canon_obj_path) op: assign_op.Equal rhs: { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<readlink>} {<-f>} {(DQ ($ Id.VSub_DollarName '$obj'))}) ) ) } spids: [1584] ) ] ) (command.ForEach iter_name: candidate iter_words: [ { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<dirname>} {(DQ ($ Id.VSub_DollarName '$canon_obj_path'))}) ) <'/.debug/'> ($ Id.VSub_DollarName '$debuglink_value') ) } {<'/usr/lib/debug'> (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<dirname>} {(${ Id.VSub_Name canon_obj_path)}) ) ) <'/'> ($ Id.VSub_DollarName '$debuglink_value') } {<'/usr/lib/debug/.build-id/'> <Id.Lit_Star '*'> <'/'> ($ Id.VSub_DollarName '$debuglink_value') } ] do_arg_iter: F body: (command.DoGroup children: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<contains_debug_symbols>} {(DQ ($ Id.VSub_DollarName '$candidate'))} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.Simple words: [ {<echo>} { (DQ <'detected debug info within debuglink '> ($ Id.VSub_DollarName '$debuglink_value') <' resolved at '> ($ Id.VSub_DollarName '$candidate') ) } ] redirects: [ (redir op: <Id.Redir_GreatAnd '1>&'> loc: (redir_loc.Fd fd:1) arg: {<2>} ) ] do_fork: T ) (C {<echo>} {(DQ ($ Id.VSub_DollarName '$candidate'))}) (command.ControlFlow token: <Id.ControlFlow_Return return> arg_word: {<0>} ) ] spids: [1649 1658] ) ] ) ] ) ) (command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<1>}) ] ) ) (command.ShFunction name: ensure_debug_symbols body: (BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:obj) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_Number '$1'))} spids: [1709] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<contains_debug_symbols>} {(DQ ($ Id.VSub_DollarName '$obj'))}) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.Simple words: [ {<echo>} {(DQ <'detected debug info within file '> ($ Id.VSub_DollarName '$obj'))} ] redirects: [ (redir op: <Id.Redir_GreatAnd '1>&'> loc: (redir_loc.Fd fd:1) arg: {<2>} ) ] do_fork: T ) (C {<echo>} {(DQ ($ Id.VSub_Number '$1'))}) (command.ControlFlow token: <Id.ControlFlow_Return return> arg_word: {<0>} ) ] spids: [1719 1728] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:debuglink_value) op: assign_op.Equal rhs: { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<read_debuglink>} {(DQ ($ Id.VSub_DollarName '$obj'))}) ) ) } spids: [1766] ) ] ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:resolved_debuglink) op: assign_op.Equal rhs: { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<resolve_debuglink>} {(DQ ($ Id.VSub_DollarName '$obj'))} {(DQ ($ Id.VSub_DollarName '$debuglink_value'))} ) ) ) } spids: [1783] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.AndOr ops: [Id.Op_DAmp] children: [ (command.DBracket expr: (bool_expr.Unary op_id: Id.BoolUnary_n child: {(DQ ($ Id.VSub_DollarName '$resolved_debuglink'))} ) ) (C {<contains_debug_symbols>} {(DQ ($ Id.VSub_DollarName '$resolved_debuglink'))} ) ] ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.Simple words: [ {<echo>} { (DQ <'detected debug info within debuglink '> ($ Id.VSub_DollarName '$debuglink_value') <' resolved at '> ($ Id.VSub_DollarName '$candidate') ) } ] redirects: [ (redir op: <Id.Redir_GreatAnd '1>&'> loc: (redir_loc.Fd fd:1) arg: {<2>} ) ] do_fork: T ) (C {<echo>} {(DQ ($ Id.VSub_DollarName '$candidate'))}) (command.ControlFlow token: <Id.ControlFlow_Return return> arg_word: {<0>} ) ] spids: [1801 1822] ) ] ) ] spids: [1764 1780] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:success_attempt) op: assign_op.Equal rhs: {(DQ )} spids: [2011] ) ] ) (command.ForEach iter_name: attempt iter_words: [ {<'/usr/lib/debug'> (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<readlink>} {<-f>} {(DQ ($ Id.VSub_DollarName '$obj'))}) ) ) } {<'/usr/lib/debug'> (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<dirname>} { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<readlink>} {<-f>} {(DQ ($ Id.VSub_DollarName '$obj'))}) ) ) } ) ) <'/'> (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<basename>} {(DQ ($ Id.VSub_DollarName '$obj'))}) ) ) } ] do_arg_iter: F body: (command.DoGroup children: [ (command.Simple words: [ {<echo>} {(DQ <'looking for a package containing '> ($ Id.VSub_DollarName '$attempt'))} ] redirects: [ (redir op: <Id.Redir_GreatAnd '1>&'> loc: (redir_loc.Fd fd:1) arg: {<2>} ) ] do_fork: T ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:apt_found) op: assign_op.Equal rhs: { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (command.Pipeline children: [ (C {<echo_then_sudo>} {<apt-file>} {<-F>} {<find>} {(DQ ($ Id.VSub_DollarName '$attempt'))} ) (C {<sed>} {(SQ <'s^: /.*^^'>)}) ] negated: F ) ) ) } spids: [2095] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Unary op_id: Id.BoolUnary_n child: {(DQ ($ Id.VSub_DollarName '$apt_found'))} ) ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:pkg) op: assign_op.Equal rhs: { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (command.Pipeline children: [ (C {<echo>} {(DQ ($ Id.VSub_DollarName '$apt_found'))}) (C {<cut>} {<-f1>}) ] negated: F ) ) ) } spids: [2139] ) ] ) (command.Simple words: [{<echo>} {(DQ <'found '> ($ Id.VSub_DollarName '$pkg'))}] redirects: [ (redir op: <Id.Redir_GreatAnd '1>&'> loc: (redir_loc.Fd fd:1) arg: {<2>} ) ] do_fork: T ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Unary op_id: Id.BoolUnary_n child: {(DQ ($ Id.VSub_DollarName '$pkg'))} ) ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.Simple words: [ {<dpkg>} {<-p>} {(DQ ($ Id.VSub_DollarName '$pkg'))} ] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) (redir op: <Id.Redir_Great '2>'> loc: (redir_loc.Fd fd:2) arg: {<'/dev/null'>} ) ] do_fork: T ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.Simple words: [ {<echo>} { (DQ ($ Id.VSub_DollarName '$pkg') <' is already installed'> ) } ] redirects: [ (redir op: <Id.Redir_GreatAnd '1>&'> loc: (redir_loc.Fd fd:1) arg: {<2>} ) ] do_fork: T ) ] spids: [2186 2203] ) ] else_action: [ (command.Simple words: [ {<echo>} { (DQ <'Attempting install of '> ($ Id.VSub_DollarName '$pkg') ) } ] redirects: [ (redir op: <Id.Redir_GreatAnd '1>&'> loc: (redir_loc.Fd fd:1) arg: {<2>} ) ] do_fork: T ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.Pipeline children: [ (C {<echo_then_sudo>} {<apt-get>} {<install>} {(DQ ($ Id.VSub_DollarName '$pkg'))} ) ] negated: T ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.Simple words: [{<echo>} {(DQ <'install failed'>)}] redirects: [ (redir op: <Id.Redir_GreatAnd '1>&'> loc: (redir_loc.Fd fd:1) arg: {<2>} ) ] do_fork: T ) (command.ControlFlow token: <Id.ControlFlow_Return return> arg_word: {<1>} ) ] spids: [2231 2246] ) ] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<contains_debug_symbols>} {(DQ ($ Id.VSub_DollarName '$attempt'))} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:correct_debuglink) op: assign_op.Equal rhs: { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<basename>} { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<readlink>} {<-f>} { (DQ ($ Id.VSub_DollarName '$attempt' ) ) } ) ) ) } ) ) ) } spids: [2290] ) ] ) (command.Simple words: [ {<echo>} { (DQ <'debuglink should say '> ($ Id.VSub_DollarName '$correct_debuglink') ) } ] redirects: [ (redir op: <Id.Redir_GreatAnd '1>&'> loc: (redir_loc.Fd fd:1) arg: {<2>} ) ] do_fork: T ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.Pipeline children: [ (C {<fixup_debuglink>} {(DQ ($ Id.VSub_DollarName '$obj'))} {(DQ ($ Id.VSub_DollarName '$attempt'))} ) ] negated: T ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.Simple words: [{<echo>} {(DQ <failed>)}] redirects: [ (redir op: <Id.Redir_GreatAnd '1>&'> loc: (redir_loc.Fd fd:1) arg: {<2>} ) ] do_fork: T ) (command.ControlFlow token: <Id.ControlFlow_Return return> arg_word: {<1>} ) ] spids: [2325 2340] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:verify_debuglink) op: assign_op.Equal rhs: { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<read_debuglink>} {(DQ ($ Id.VSub_DollarName '$obj'))} ) ) ) } spids: [2366] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: { (DQ ($ Id.VSub_DollarName '$verify_debuglink' ) ) } right: { (DQ ($ Id.VSub_DollarName '$correct_debuglink' ) ) } ) ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<echo>} {(DQ ($ Id.VSub_DollarName '$attempt'))}) (command.ControlFlow token: <Id.ControlFlow_Return return> arg_word: {<0>} ) ] spids: [2380 2397] ) ] else_action: [ (command.Simple words: [ {<echo>} {(DQ <'debuglink not fixed up properly'>)} ] redirects: [ (redir op: <Id.Redir_GreatAnd '1>&'> loc: (redir_loc.Fd fd:1) arg: {<2>} ) ] do_fork: T ) (command.ControlFlow token: <Id.ControlFlow_Return return> arg_word: {<1>} ) ] ) ] spids: [2274 2283] ) ] else_action: [ (command.Simple words: [ {<echo>} { (DQ <'installed package unexpectedly lacked debug info'> ) } ] redirects: [ (redir op: <Id.Redir_GreatAnd '1>&'> loc: (redir_loc.Fd fd:1) arg: {<2>} ) ] do_fork: T ) (command.ControlFlow token: <Id.ControlFlow_Return return> arg_word: {<1>} ) ] ) ] spids: [2170 2183] ) ] else_action: [ (command.Simple words: [{<echo>} {(DQ <'apt-file printed something strange'>)}] redirects: [ (redir op: <Id.Redir_GreatAnd '1>&'> loc: (redir_loc.Fd fd:1) arg: {<2>} ) ] do_fork: T ) (command.ControlFlow token: <Id.ControlFlow_Continue continue> ) ] ) ] spids: [2123 2136] ) ] else_action: [ (command.Simple words: [{<echo>} {(DQ <'package not found'>)}] redirects: [ (redir op: <Id.Redir_GreatAnd '1>&'> loc: (redir_loc.Fd fd:1) arg: {<2>} ) ] do_fork: T ) (command.ControlFlow token: <Id.ControlFlow_Continue continue> ) ] ) ] ) ) (command.Simple words: [{<echo>} {(DQ <'giving up'>)}] redirects: [(redir op:<Id.Redir_GreatAnd '1>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})] do_fork: T ) (command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<1>}) ] ) ) (command.ShFunction name: ensure_debug_source body: (BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:obj) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_Number '$1'))} spids: [2535] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:first_compile_unit_context) op: assign_op.Equal rhs: { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (command.Pipeline children: [ (C {<readelf>} {<-wi>} {(DQ ($ Id.VSub_DollarName '$obj'))}) (C {<grep>} {<-m1>} {<-A5>} {<compile_unit>}) ] negated: F ) ) ) } spids: [2545] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:compile_unit_name) op: assign_op.Equal rhs: { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (command.Pipeline children: [ (C {<echo>} {(DQ ($ Id.VSub_DollarName '$first_compile_unit_context'))}) (C {<grep>} {<DW_AT_name>}) (C {<sed>} { (SQ < 's/.*DW_AT_name.*indirect string, offset: 0x[0-9a-f]\\+): //' > ) } ) (C {<sed>} {(SQ <'s/[[:blank:]]*$//'>)}) ] negated: F ) ) ) } spids: [2574] ) ] ) (command.Simple words: [ {<echo>} {(DQ <'extracted CU name: '> ($ Id.VSub_DollarName '$compile_unit_name'))} ] redirects: [(redir op:<Id.Redir_GreatAnd '1>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})] do_fork: T ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:comp_dir) op: assign_op.Equal rhs: { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (command.Pipeline children: [ (C {<echo>} {(DQ ($ Id.VSub_DollarName '$first_compile_unit_context'))}) (C {<grep>} {<comp_dir>}) (C {<sed>} { (SQ < 's/.*DW_AT_comp_dir.*(indirect string, offset: 0x[0-9a-f]\\+): //' > ) } ) (C {<sed>} {(SQ <'s/[[:blank:]]*$//'>)}) ] negated: F ) ) ) } spids: [2636] ) ] ) (command.Simple words: [ {<echo>} {(DQ <'extracted compilation directory: '> ($ Id.VSub_DollarName '$comp_dir'))} ] redirects: [(redir op:<Id.Redir_GreatAnd '1>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})] do_fork: T ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Unary op_id: Id.BoolUnary_r child: { (DQ (${ Id.VSub_Name comp_dir) <'/'> (${ Id.VSub_Name compile_unit_name) ) } ) ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.Simple words: [{<echo>} {(DQ <'guessing that source does exist already'>)}] redirects: [ (redir op: <Id.Redir_GreatAnd '1>&'> loc: (redir_loc.Fd fd:1) arg: {<2>} ) ] do_fork: T ) (command.ControlFlow token: <Id.ControlFlow_Return return> arg_word: {<0>} ) ] spids: [2694 2713] ) ] else_action: [ (command.Simple words: [{<echo>} {(DQ <'source does not exist already'>)}] redirects: [(redir op:<Id.Redir_GreatAnd '1>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})] do_fork: T ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Unary op_id: Id.BoolUnary_z child: {(DQ ($ Id.VSub_DollarName '$DPKG_SOURCE_ROOT'))} ) ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:DPKG_SOURCE_ROOT) op: assign_op.Equal rhs: { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<mktemp>} {<-d>}) ) ) } spids: [2769] ) ] ) ] spids: [2753 2766] ) ] ) (command.Simple words: [ {<echo>} {(DQ <'downloading source to '> ($ Id.VSub_DollarName '$DPKG_SOURCE_ROOT'))} ] redirects: [(redir op:<Id.Redir_GreatAnd '1>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})] do_fork: T ) (command.Subshell child: (command.CommandList children: [ (C {<cd>} {(DQ ($ Id.VSub_DollarName '$DPKG_SOURCE_ROOT'))}) (command.AndOr ops: [Id.Op_DPipe] children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:owning_package) op: assign_op.Equal rhs: { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (command.Pipeline children: [ (C {<dpkg>} {<-S>} {(DQ ($ Id.VSub_DollarName '$obj'))}) (C {<sed>} {(SQ <'s^: /.*^^'>)}) ] negated: F ) ) ) } spids: [2808] ) ] ) (command.Subshell child: (command.CommandList children: [ (command.Sentence child: (command.Simple words: [{<echo>} {(DQ <'failed to identify owning package'>)}] redirects: [ (redir op: <Id.Redir_GreatAnd '1>&'> loc: (redir_loc.Fd fd:1) arg: {<2>} ) ] do_fork: T ) terminator: <Id.Op_Semi _> ) (command.ControlFlow token: <Id.ControlFlow_Return return> arg_word: {<1>} ) ] ) ) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (C {<apt-get>} {<source>} {(DQ ($ Id.VSub_DollarName '$owning_package'))}) (command.Subshell child: (command.CommandList children: [ (command.Sentence child: (command.Simple words: [{<echo>} {(DQ <'failed to download source'>)}] redirects: [ (redir op: <Id.Redir_GreatAnd '1>&'> loc: (redir_loc.Fd fd:1) arg: {<2>} ) ] do_fork: T ) terminator: <Id.Op_Semi _> ) (command.ControlFlow token: <Id.ControlFlow_Return return> arg_word: {<1>} ) ] ) ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:source_dirname) op: assign_op.Equal rhs: { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (command.Pipeline children: [(C {<ls>} {<-t>}) (C {<head>} {<-n1>})] negated: F ) ) ) } spids: [2877] ) ] ) (command.Simple words: [ {<echo>} { (DQ <'guessing source was extracted in '> ($ Id.VSub_DollarName '$source_dirname') ) } ] redirects: [ (redir op: <Id.Redir_GreatAnd '1>&'> loc: (redir_loc.Fd fd:1) arg: {<2>} ) ] do_fork: T ) (command.Case to_match: {(DQ ($ Id.VSub_DollarName '$comp_dir'))} arms: [ (case_arm pat_list: [{<'/build/buildd/'> <Id.Lit_Star '*'>}] action: [ (command.Simple words: [{<echo>} {(DQ <'found a buildd build'>)}] redirects: [ (redir op: <Id.Redir_GreatAnd '1>&'> loc: (redir_loc.Fd fd:1) arg: {<2>} ) ] do_fork: T ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:source_dirname_escaped) op: assign_op.Equal rhs: { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (command.Pipeline children: [ (C {<echo>} {(DQ ($ Id.VSub_DollarName '$source_dirname'))} ) (C {<escape_regexp_floating>}) ] negated: F ) ) ) } spids: [2936] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:prefix) op: assign_op.Equal rhs: { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (command.Pipeline children: [ (C {<echo>} {(DQ ($ Id.VSub_DollarName '$comp_dir'))}) (C {<sed>} { (DQ <'s^'> <Id.Lit_BadBackslash '\\'> <'(.*/'> (${ Id.VSub_Name source_dirname_escaped) <'/'> <Id.Lit_BadBackslash '\\'> <').*^'> <Id.Lit_BadBackslash '\\'> <'1^'> ) } ) ] negated: F ) ) ) } spids: [2957] ) ] ) (command.Simple words: [ {<echo>} { (DQ <'calculated source path prefix '> ($ Id.VSub_DollarName '$prefix') ) } ] redirects: [ (redir op: <Id.Redir_GreatAnd '1>&'> loc: (redir_loc.Fd fd:1) arg: {<2>} ) ] do_fork: T ) (command.AndOr ops: [Id.Op_DAmp Id.Op_DPipe] children: [ (C {<echo_then_sudo>} {<mkdir>} {<-p>} { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<dirname>} {(DQ ($ Id.VSub_DollarName '$prefix'))}) ) ) } ) (C {<echo_then_sudo>} {<ln>} {<-s>} {(DQ ($ Id.VSub_DollarName '$source_dirname'))} {(DQ ($ Id.VSub_DollarName '$prefix'))} ) (command.Subshell child: (command.CommandList children: [ (command.Sentence child: (command.Simple words: [{<echo>} {(DQ <'failed to mkdir or symlink'>)}] redirects: [ (redir op: <Id.Redir_GreatAnd '1>&'> loc: (redir_loc.Fd fd:1) arg: {<2>} ) ] do_fork: T ) terminator: <Id.Op_Semi _> ) (command.ControlFlow token: <Id.ControlFlow_Return return> arg_word: {<1>} ) ] ) ) ] ) (command.Simple words: [{<echo>} {(DQ <success>)}] redirects: [ (redir op: <Id.Redir_GreatAnd '1>&'> loc: (redir_loc.Fd fd:1) arg: {<2>} ) ] do_fork: T ) (command.ControlFlow token: <Id.ControlFlow_Return return> arg_word: {<0>} ) ] spids: [2920 2923 3077 -1] ) (case_arm pat_list: [{<Id.Lit_Star '*'>}] action: [ (command.Simple words: [{<echo>} {(DQ <'package was built at bad source directory'>)}] redirects: [ (redir op: <Id.Redir_GreatAnd '1>&'> loc: (redir_loc.Fd fd:1) arg: {<2>} ) ] do_fork: T ) (command.ControlFlow token: <Id.ControlFlow_Return return> arg_word: {<1>} ) ] spids: [3080 3082 3101 -1] ) ] ) ] ) ) ] ) ) ] )