Bläddra i källkod

Have peek command honor "tagfocus"

The peek command allows looking at details of a function, and it
avoids any trimming to provide full details. However, when using
tagfocus it is useful to still limit to the filtered samples.
With this change peek will honor tagfocus, but it will avoid any
other trimming.
Raul Silvera 9 år sedan
förälder
incheckning
9472279cde
1 ändrade filer med 4 tillägg och 2 borttagningar
  1. 4
    2
      internal/driver/driver.go

+ 4
- 2
internal/driver/driver.go Visa fil

@@ -124,11 +124,11 @@ func generateReport(p *profile.Profile, cmd []string, vars variables, o *plugin.
124 124
 }
125 125
 
126 126
 func applyCommandOverrides(cmd []string, v variables) variables {
127
-	trim, focus, hide := v["trim"].boolValue(), true, true
127
+	trim, focus, tagfocus, hide := v["trim"].boolValue(), true, true, true
128 128
 
129 129
 	switch cmd[0] {
130 130
 	case "proto", "raw":
131
-		trim, focus, hide = false, false, false
131
+		trim, focus, tagfocus, hide = false, false, false, false
132 132
 		v.set("addresses", "t")
133 133
 	case "disasm", "weblist":
134 134
 		trim = false
@@ -155,6 +155,8 @@ func applyCommandOverrides(cmd []string, v variables) variables {
155 155
 	if focus == false {
156 156
 		v.set("focus", "")
157 157
 		v.set("ignore", "")
158
+	}
159
+	if tagfocus == false {
158 160
 		v.set("tagfocus", "")
159 161
 		v.set("tagignore", "")
160 162
 	}