hoe-debugging 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG.rdoc +6 -0
- data/Manifest.txt +5 -0
- data/README.rdoc +49 -0
- data/Rakefile +12 -0
- data/lib/hoe/debugging.rb +62 -0
- metadata +89 -0
data/CHANGELOG.rdoc
ADDED
data/Manifest.txt
ADDED
data/README.rdoc
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
= hoe-debugging
|
2
|
+
|
3
|
+
* http://github.com/jbarnette/hoe-debugging
|
4
|
+
|
5
|
+
== Description
|
6
|
+
|
7
|
+
A Hoe plugin to help you debug your codes. This plugin provides
|
8
|
+
<tt>test:gdb</tt> and <tt>test:valgrind</tt> tasks (with a few
|
9
|
+
variants). See the Hoe::Debugging module for a few configuration
|
10
|
+
options.
|
11
|
+
|
12
|
+
This plugin expects you to have <tt>gdb</tt> and <tt>valgrind</tt>
|
13
|
+
available in your <tt>PATH</tt>.
|
14
|
+
|
15
|
+
== Examples
|
16
|
+
|
17
|
+
# in your Rakefile
|
18
|
+
Hoe.plugin :debugging
|
19
|
+
|
20
|
+
# in your shell
|
21
|
+
$ rake test:gdb
|
22
|
+
|
23
|
+
== Installation
|
24
|
+
|
25
|
+
$ gem install hoe-debugging
|
26
|
+
|
27
|
+
== License
|
28
|
+
|
29
|
+
Copyright 2009 John Barnette (jbarnette@rubyforge.org),
|
30
|
+
Aaron Patterson (apatterson@rubyforge.org)
|
31
|
+
|
32
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
33
|
+
a copy of this software and associated documentation files (the
|
34
|
+
'Software'), to deal in the Software without restriction, including
|
35
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
36
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
37
|
+
permit persons to whom the Software is furnished to do so, subject to
|
38
|
+
the following conditions:
|
39
|
+
|
40
|
+
The above copyright notice and this permission notice shall be
|
41
|
+
included in all copies or substantial portions of the Software.
|
42
|
+
|
43
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
44
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
45
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
46
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
47
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
48
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
49
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/Rakefile
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
require "rubygems"
|
2
|
+
require "hoe"
|
3
|
+
|
4
|
+
Hoe.spec "hoe-debugging" do
|
5
|
+
developer "John Barnette", "jbarnette@rubyforge.org"
|
6
|
+
|
7
|
+
self.extra_rdoc_files = FileList["*.rdoc"]
|
8
|
+
self.history_file = "CHANGELOG.rdoc"
|
9
|
+
self.readme_file = "README.rdoc"
|
10
|
+
|
11
|
+
extra_deps << ["hoe", "~> 2.1.0"]
|
12
|
+
end
|
@@ -0,0 +1,62 @@
|
|
1
|
+
class Hoe #:nodoc:
|
2
|
+
|
3
|
+
# Whee, stuff to help when your codes are b0rked. Tasks provided:
|
4
|
+
#
|
5
|
+
# * <tt>test:gdb</tt>
|
6
|
+
# * <tt>test:valgrind</tt>
|
7
|
+
# * <tt>test:valgrind:mem</tt>
|
8
|
+
# * <tt>test:valgrind:mem0</tt>
|
9
|
+
|
10
|
+
module Debugging
|
11
|
+
VERSION = "1.0.0" #:nodoc:
|
12
|
+
|
13
|
+
##
|
14
|
+
# Optional: Used to add flags to GDB. [default: <tt>[]</tt>]
|
15
|
+
|
16
|
+
attr_accessor :gdb_options
|
17
|
+
|
18
|
+
##
|
19
|
+
# Optional: Used to add flags to valgrind. [default:
|
20
|
+
# <tt>%w(--num-callers=50 --error-limit=no --partial-loads-ok=yes
|
21
|
+
# --undef-value-errors=no)</tt>]
|
22
|
+
|
23
|
+
attr_accessor :valgrind_options
|
24
|
+
|
25
|
+
def initialize_debugging #:nodoc:
|
26
|
+
self.gdb_options = []
|
27
|
+
|
28
|
+
self.valgrind_options = ["--num-callers=50",
|
29
|
+
"--error-limit=no",
|
30
|
+
"--partial-loads-ok=yes",
|
31
|
+
"--undef-value-errors=no"]
|
32
|
+
end
|
33
|
+
|
34
|
+
def define_debugging_tasks #:nodoc:
|
35
|
+
if File.directory? "test" then
|
36
|
+
desc "Run the test suite under GDB."
|
37
|
+
task "test:gdb" do
|
38
|
+
sh "gdb #{gdb_options.join ' '} --args #{RUBY} #{make_test_cmd}"
|
39
|
+
end
|
40
|
+
|
41
|
+
desc "Run the test suite under Valgrind."
|
42
|
+
task "test:valgrind" do
|
43
|
+
sh "valgrind #{valgrind_options.join ' '} #{RUBY} #{make_test_cmd}"
|
44
|
+
end
|
45
|
+
|
46
|
+
desc "Run the test suite under Valgrind with memory-fill."
|
47
|
+
task "test:valgrind:mem" do
|
48
|
+
sh "valgrind #{valgrind_options.join ' '} " +
|
49
|
+
"--freelist-vol=100000000 --malloc-fill=6D --free-fill=66 " +
|
50
|
+
"#{RUBY} #{make_test_cmd}"
|
51
|
+
end
|
52
|
+
|
53
|
+
desc "Run the test suite under Valgrind with memory-zero."
|
54
|
+
task "test:valgrind:mem0" do
|
55
|
+
sh "valgrind #{valgrind_options.join ' '} " +
|
56
|
+
"--freelist-vol=100000000 --malloc-fill=00 --free-fill=00 " +
|
57
|
+
"#{RUBY} #{make_test_cmd}"
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
metadata
ADDED
@@ -0,0 +1,89 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: hoe-debugging
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- John Barnette
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
|
12
|
+
date: 2009-06-22 00:00:00 -07:00
|
13
|
+
default_executable:
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: hoe
|
17
|
+
type: :runtime
|
18
|
+
version_requirement:
|
19
|
+
version_requirements: !ruby/object:Gem::Requirement
|
20
|
+
requirements:
|
21
|
+
- - ~>
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: 2.1.0
|
24
|
+
version:
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: hoe
|
27
|
+
type: :development
|
28
|
+
version_requirement:
|
29
|
+
version_requirements: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 2.2.0
|
34
|
+
version:
|
35
|
+
description: |-
|
36
|
+
A Hoe plugin to help you debug your codes. This plugin provides
|
37
|
+
<tt>test:gdb</tt> and <tt>test:valgrind</tt> tasks (with a few
|
38
|
+
variants). See the Hoe::Debugging module for a few configuration
|
39
|
+
options.
|
40
|
+
|
41
|
+
This plugin expects you to have <tt>gdb</tt> and <tt>valgrind</tt>
|
42
|
+
available in your <tt>PATH</tt>.
|
43
|
+
email:
|
44
|
+
- jbarnette@rubyforge.org
|
45
|
+
executables: []
|
46
|
+
|
47
|
+
extensions: []
|
48
|
+
|
49
|
+
extra_rdoc_files:
|
50
|
+
- Manifest.txt
|
51
|
+
- CHANGELOG.rdoc
|
52
|
+
- README.rdoc
|
53
|
+
files:
|
54
|
+
- CHANGELOG.rdoc
|
55
|
+
- Manifest.txt
|
56
|
+
- README.rdoc
|
57
|
+
- Rakefile
|
58
|
+
- lib/hoe/debugging.rb
|
59
|
+
has_rdoc: true
|
60
|
+
homepage: http://github.com/jbarnette/hoe-debugging
|
61
|
+
licenses: []
|
62
|
+
|
63
|
+
post_install_message:
|
64
|
+
rdoc_options:
|
65
|
+
- --main
|
66
|
+
- README.rdoc
|
67
|
+
require_paths:
|
68
|
+
- lib
|
69
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
70
|
+
requirements:
|
71
|
+
- - ">="
|
72
|
+
- !ruby/object:Gem::Version
|
73
|
+
version: "0"
|
74
|
+
version:
|
75
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
76
|
+
requirements:
|
77
|
+
- - ">="
|
78
|
+
- !ruby/object:Gem::Version
|
79
|
+
version: "0"
|
80
|
+
version:
|
81
|
+
requirements: []
|
82
|
+
|
83
|
+
rubyforge_project: hoe-debugging
|
84
|
+
rubygems_version: 1.3.3
|
85
|
+
signing_key:
|
86
|
+
specification_version: 3
|
87
|
+
summary: A Hoe plugin to help you debug your codes
|
88
|
+
test_files: []
|
89
|
+
|