Wireshark-dev: Re: [Wireshark-dev] Not hitting some breakpoints with CLion macOS
From: Jan Venekamp <jan@xxxxxxxxxxxx>
Date: Mon, 17 Dec 2018 19:36:29 +0100
|
Thank you for pointing to the line pragmas. It turns out CLion does
not like these (or maybe there is some setting I could not found). After setting the -L flag of asn2wrs.py in epan/dissectors/asn1/ulp/CMakeLists.txt and regenerating the ulp dissector I was able to step through the code. I had to patch the asn2wrs.py script though. Because even with the -L switch it was still outputting line pragmas. Attached is the patch I made. Kind regards, Jan Venekamp On 08/12/2018 06:17, Anders Broman
wrote:
|
Index: tools/asn2wrs.py
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- tools/asn2wrs.py (revision 332df929a9966fda2cd3aa30a5a107e5b2bfa360)
+++ tools/asn2wrs.py (date 1544566369000)
@@ -2837,6 +2837,11 @@
self.created_files = {}
self.created_files_ord = []
self.keep = False
+ self.suppress_line = False
+
+ def set_opt(self, opt, par, fn, lineno):
+ if opt in ("-L",):
+ self.suppress_line = True
def outcomment(self, ln, comment=None):
if comment:
@@ -2951,7 +2956,8 @@
fout.write(self.fhdr(out_nm))
fout.write('/* Input file: ' + os.path.basename(in_nm) +' */\n')
fout.write('\n')
- fout.write('#line %u "%s"\n' % (1, rel_dissector_path(in_nm)))
+ if (not self.suppress_line):
+ fout.write('#line %u "%s"\n' % (1, rel_dissector_path(in_nm)))
include = re.compile(r'^\s*#\s*include\s+[<"](?P<fname>[^>"]+)[>"]', re.IGNORECASE)
@@ -2973,12 +2979,14 @@
if (ifile):
fout.write('\n')
fout.write('/*--- Included file: ' + ifile + ' ---*/\n')
- fout.write('#line %u "%s"\n' % (1, rel_dissector_path(ifile)))
+ if (not self.suppress_line):
+ fout.write('#line %u "%s"\n' % (1, rel_dissector_path(ifile)))
finc = open(ifile, "r")
fout.write(finc.read())
fout.write('\n')
fout.write('/*--- End of included file: ' + ifile + ' ---*/\n')
- fout.write('#line %u "%s"\n' % (cont_linenum+1, rel_dissector_path(in_nm)) )
+ if (not self.suppress_line):
+ fout.write('#line %u "%s"\n' % (cont_linenum+1, rel_dissector_path(in_nm)) )
finc.close()
else:
fout.write(line)
@@ -7936,6 +7944,7 @@
par = []
if a: par.append(a)
ectx.conform.set_opt(o, par, "commandline", 0)
+ ectx.output.set_opt(o, par, "commandline", 0)
(ld, yd, pd) = (0, 0, 0);
if ectx.dbg('l'): ld = 1
- Follow-Ups:
- Re: [Wireshark-dev] Not hitting some breakpoints with CLion macOS
- From: Anders Broman
- Re: [Wireshark-dev] Not hitting some breakpoints with CLion macOS
- References:
- [Wireshark-dev] Not hitting some breakpoints with CLion macOS
- From: Jan Venekamp
- Re: [Wireshark-dev] Not hitting some breakpoints with CLion macOS
- From: Anders Broman
- [Wireshark-dev] Not hitting some breakpoints with CLion macOS
- Prev by Date: Re: [Wireshark-dev] 2.9.0 and 3.0.0 release schedule
- Next by Date: [Wireshark-dev] Unit tests for dissectors
- Previous by thread: Re: [Wireshark-dev] Not hitting some breakpoints with CLion macOS
- Next by thread: Re: [Wireshark-dev] Not hitting some breakpoints with CLion macOS
- Index(es):