Skip to content

Commit

Permalink
chore: add message about --force to disass cmd Analyze() failures
Browse files Browse the repository at this point in the history
  • Loading branch information
blacktop committed Jan 9, 2025
1 parent d96e69f commit de2f71b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions cmd/ipsw/cmd/dyld/dyld_disass.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ var DisassCmd = &cobra.Command{
//***********************
if err := image.Analyze(); err != nil {
if !viper.GetBool("dyld.disass.force") {
return fmt.Errorf("failed to analyze image %s: %v", filepath.Base(image.Name), err)
return fmt.Errorf("failed to analyze image %s: %v (use --force to continue anyway)", filepath.Base(image.Name), err)
}
}
if err := engine.Triage(); err != nil {
Expand All @@ -217,7 +217,7 @@ var DisassCmd = &cobra.Command{
for _, img := range engine.Dylibs() {
if err := img.Analyze(); err != nil {
if !viper.GetBool("dyld.disass.force") {
return fmt.Errorf("failed to analyze image %s: %v", filepath.Base(img.Name), err)
return fmt.Errorf("failed to analyze image %s: %v (use --force to continue anyway)", filepath.Base(img.Name), err)
}
}
}
Expand Down Expand Up @@ -302,7 +302,7 @@ var DisassCmd = &cobra.Command{
}
if err := image.Analyze(); err != nil {
if !viper.GetBool("dyld.disass.force") {
return fmt.Errorf("failed to analyze image %s: %v", filepath.Base(image.Name), err)
return fmt.Errorf("failed to analyze image %s: %v (use --force to continue anyway)", filepath.Base(image.Name), err)
}
}
if err := engine.Triage(); err != nil {
Expand All @@ -311,7 +311,7 @@ var DisassCmd = &cobra.Command{
for _, img := range engine.Dylibs() {
if err := img.Analyze(); err != nil {
if !viper.GetBool("dyld.disass.force") {
return fmt.Errorf("failed to analyze image %s: %v", filepath.Base(img.Name), err)
return fmt.Errorf("failed to analyze image %s: %v (use --force to continue anyway)", filepath.Base(img.Name), err)
}
}
}
Expand Down Expand Up @@ -416,12 +416,12 @@ var DisassCmd = &cobra.Command{
//* First pass ANALYSIS *
//***********************
if err := engine.Triage(); err != nil {
return fmt.Errorf("first pass triage failed: %v", err)
return fmt.Errorf("first pass triage failed: %v (use --force to continue anyway)", err)
}
for _, img := range engine.Dylibs() {
if err := img.Analyze(); err != nil {
if !viper.GetBool("dyld.disass.force") {
return fmt.Errorf("failed to analyze image %s: %v", filepath.Base(img.Name), err)
return fmt.Errorf("failed to analyze image %s: %v (use --force to continue anyway)", filepath.Base(img.Name), err)
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions cmd/ipsw/cmd/macho/macho_disass.go
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ var machoDisassCmd = &cobra.Command{
if len(symbolMap) == 0 {
if err := engine.Analyze(); err != nil {
if !viper.GetBool("macho.disass.force") {
return fmt.Errorf("MachO analysis failed: %v", err)
return fmt.Errorf("MachO analysis failed: %v (use --force to continue anyway)", err)
}
}
}
Expand Down Expand Up @@ -394,7 +394,7 @@ var machoDisassCmd = &cobra.Command{
}
if err := engine.Analyze(); err != nil {
if !viper.GetBool("macho.disass.force") {
return fmt.Errorf("MachO analysis failed: %v", err)
return fmt.Errorf("MachO analysis failed: %v (use --force to continue anyway)", err)
}
}
if err := engine.SaveAddrToSymMap(cacheFile); err != nil {
Expand Down

0 comments on commit de2f71b

Please sign in to comment.